![]() ![]() However, using the – resize options we have covered, it is, of course, perfectly feasible to enlarge our image. To conclude this section, typically, the most common way to change the size of an image is to shrink it to fit the desired size. Consequently, the actual scale may not exactly match the scaling factor we provide, but it will be very close. If you are using a 64-bit system, the module directory path would be /usr/lib64/php/modules. It will install ImageMagick and imagick PHP extension module ‘imagick.so ‘ under /usr/lib/php/modules directory. To do, simply run the following ‘ pecl ‘ command. This will scale the image by the amount specified: convert flower_original.jpeg -resize 50% half_flower.jpegįor most of us, this type of scaling will be perfectly fine, but we should note that the final pixel size of the image will be rounded to the nearest integer. Next, compile the Imagick for PHP extension. Similarly, we can also specify a percentage value when using the resize option. ![]() In this example, we fit our original flower image into a smaller square box 64×64 pixels in size: We can build on the previous example by using the -resize option of the convert command: convert flower_original.jpeg -resize 64圆4 flower_64圆4.jpeg Another typical operation is image resizing. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |