Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • That’s a nice snippet. It would have been easier to follow a prose description though: “if the image is more than twice as large as the target resolution, use preview mode to quickly cut it in half before downsizing normally, and then sharpen the result a bit afterwards.”

    Anyway, I’m filing this idea away.

    • sorry - I should have added a description.

      Still, it made you read the code :-)
  • Memories supports resizing with Imager if it has to, but prefers Image::Imlib2, which is lightning-fast for image resizes. So much so that it generates the resized versions of pictures on the fly without noticable performance degradation.
    • I haven't. Harder to install? I guess it requires libimlib2...
      • I installed it from distro packages and of course didn't have any trouble, on both Debian and CentOS.
    • I was recently planning to switch an app from ImageMagick to Imlib2 for thumbnails and wrote a benchmark to see how much improvement I would get. I just added Imager for comparison:

      Rate imager magick preview imlib2
      imager 4.92/s -- -2% -64% -82%
      magick 5.04/s 2% -- -63% -81%
      preview 13.5/s 174% 168% -- -50%
      imlib2 26.8/s 445% 432% 99% --

      So, Imlib2 is faster than even Imager's preview mode. Of course Imager does a lot of thin

      • Use <ecode> tags :-)

        Thanks - looks like I need to investigate Imlib2.

        I suppose working on Win32 is too much to ask.
  • The next release of Imager will add a new scaling qtype that's faster than normal but better quality than preview. It's still slower than I like.