https://bugzilla.wikimedia.org/show_bug.cgi?id=32721

--- Comment #4 from Tim Starling <[email protected]> 2011-12-05 04:21:16 
UTC ---
Hmmm, this is a pretty large error on my part. VIPS is not doing any low memory
magic when reading JPEG or PNG source images.

VIPS is writing out an uncompressed copy of the source image to /tmp and
presumably exceeding the file size limit. If the source image is less than
100MB, it makes the copy in memory instead, despite my previous assertions to
the contrary. My measure-memory script missed the allocation because it was
done in a separate thread.

We can set IM_DISC_THRESHOLD to prevent VIPS from writing temporary files. 

For JPEG images we can get VIPS to prescale the source image, like how we do it
with ImageMagick. Instead of this:

vips im_shrink chicago.jpg dst.jpg 20 20

we would do this:

vips im_shrink chicago.jpg:8 dst.jpg 2.5 2.5

See
<http://www.vips.ecs.soton.ac.uk/supported/current/doc/html/libvips/VipsFormat.html#im-jpeg2vips>
for the details. But apparently there's not much value in using VIPS over
ImageMagick for JPEGs since both are fast and ImageMagick probably looks nicer.

For TIFFs, now that I've fixed my testing procedure, I'm getting the expected
difference in memory usage between tiled and untiled images. I'll put a
correction on bug 23258.

For PNGs, i.e. the whole point of this project, we seem to be pretty much
screwed. I haven't looked into the details of when it will or won't use memory,
but it's not looking good. 

At least we can reuse most of the code you've written to integrate with pngds
instead.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to