Tag:Picture format

  • Learn the use of GD Library in PHP (I)

    Time:2021-9-16

    We have reached a very familiar library. For image and graphics processing, Gd library is a barrier that PHPer can’t get around. From the very early CMS or discuz era, all kinds of open source software will clearly point out that GD library is a necessary extension when they are installed. Of course, in the […]

  • Uiimage for IOS development and learning

    Time:2021-7-27

    1. Two ways of loading pictures in uiimage (1) There is a cache (the memory occupied by pictures will always stay in the program), which may cause the program to crash due to a large amount of memory. It can be used when loading a small number of small pictures. + (UIImage *)imageNamed:(NSString *)name; Name […]

  • How to choose PNG, JPG, GIF for web page image format

    Time:2021-6-29

    So in the end, in GIF, PNG, JPG format, which one should we choose as a candidate format, and which image format can make the image smaller but have better image quality? 1. Image format GIF GIF’s most outstanding feature is that it supports animation. At the same time, GIF is also a lossless image […]

  • Python to achieve opencv used by the image format and Base64 conversion

    Time:2021-5-4

    The NP image (imread image) is transcoded to Base64 format def image_to_base64(image_np): image = cv2.imencode(‘.jpg’,image_np)[1] image_code = str(base64.b64encode(image))[2:-1] return image_code Parsing Base64 encoding into opencv available pictures def base64_to_image(base64_code): #Base64 decoding img_data = base64.b64decode(base64_code) #Convert to NP array img_array = np.fromstring(img_data, np.uint8) #Convert to opencv format img = cv2.imdecode(img_array, cv2.COLOR_RGB2BGR) return img The above image […]

  • Image compression using canvas

    Time:2021-4-9

    Well, first of allURL.createObjectURL(file)Get the address of the picture directly from the file object I won’t talk about it in detail. I’ll start to compress it Oh, there’s a point to note: Every callcreateObjectURLWhen a new URL object is created, even for the same file object, a new pair of URL objects will be created. […]

  • How to convert MAC image format

    Time:2021-3-23

    I believe that the screenshot tool you use is difficult to export JPG format directly, but there are many cases where the pictures you need are in IPG format. Don’t panic. If you use a third-party software, I believe you can also convert the picture format to IPG, but in fact the MAC system has […]

  • Python to determine the image format and conversion, the conversion of the image saved to the generated folder

    Time:2021-1-14

    I don’t want to talk much nonsense. Let’s go straight to the code! import Image from datetime import datetime import os str = ‘/home/dltest/caffe/examples/sgg_datas/images/result_test/zutest/’ + datetime.now().strftime(“%Y%m%d_%H%M%S”) while True==os.path.exists(str): str = str + datetime.now().strftime(“%Y%m%d_%H%M%S”) os.makedirs (STR) # create folder imageFile = ‘/home/dltest/caffe/examples/sgg_ datas/images/result_ Test / zutest / 20form1. BMP ‘# image path import imghdr imgType = […]

  • C ා image format conversion

    Time:2020-9-22

    In daily work, we often need pictures of different formats (jpg, PNG, BMP, GIF, ICO), and sometimes we need to convert the image formats. In this paper, with a simple example, we briefly describe the common methods of image format conversion, which is only for learning and sharing. If there are any shortcomings, please correct […]

  • Using html2canvas to implement browser screenshot

    Time:2020-9-14

    To use html2canvas to implement browser screenshots, you mustServer environmentIn order to achieve. effect Html2canvas can take screen shots of browser side through pure JS, but the accuracy of the screenshot needs to be improved,Some CSS is not recognizedTherefore, it is not perfect to present the original picture style in canvas /*Multi line overflow ellipsis […]

  • The use of Django imagekit

    Time:2020-7-28

    1. Installation To use the imagefield module in Django, you must first install the third-party library pillow: pip install pillow pip install django-imagekit After completing the above steps, in the Django project settings.py Installed in file_ Apps addedimagekit。 Now that the preparation is complete, you can use the Django imagekit to process the images in […]

  • PHP upload image

    Time:2020-7-15

    First of all, you need a form and click the submit button to submit to upload_ file.php file Filename:    upload_ file.php The documents are as follows 0) { echo “Return Code: ” . $_FILES[“file”][“error”] . “”; } else { echo “Upload: ” . $_FILES[“file”][“name”] . “”; echo “Type: ” . $_FILES[“file”][“type”] . “”; echo […]