Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You CPU time is going to 3 tasks:</p> <ul> <li>JPEG decompression;</li> <li>resize;</li> <li>JPEG recompression</li> </ul> <p>(Cropping itself takes maybe 1% of your time.)</p> <p>To decode JPEG, just do it once, hold the result in RAM, and reuse for each output. (Details below.) That way, the cost will be insignificant.</p> <p>To encode JPEG, use libjpeg-turbo; same API, but a 2-4x speedup if you use x86-{32,64} or ARM hardware.</p> <p>To resize, ImageMagick is well-known for using ~100x as much CPU as any other software except PhotoShop and GIMP. That includes all photo viewers. It's doing multiple trigonometric functions per pixel, whereas everyone else just does one multiplication. Sometimes, if you look at pixels near a edge in the image, you can see ImageMagick choose a better color than its competitors. But if you think HTML5, Flash, Silverlight, Java, GD (popular with Perl, PHP, and Python web apps) etc look fine, then you don't need such pseudo-AI (artificial intelligence). You might be able to throw GPU (OpenCL) horsepower or more CPU (OpenMP) into ImageMagick, but why bother?</p> <p>For high-efficiency, the equivalent of ImageMagick (de facto standard) is Imlib2. It is usable from almost as many OS/language environments as ImageMagick.</p> <p>Your "convert" shell command is equivalent to 10-20 lines of a high level language calling Imlib2: decompress JPEG, and then repeatedly crop, resize, and compress JPEG.</p> <p>An example without crop (or multiple output) is: <a href="https://stackoverflow.com/questions/486874/how-can-i-stretch-or-resize-an-image-using-perl">Stretch, resize, or thumbnail an image using Perl</a></p> <p>Let me know if you want other examples.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload