Sorry, I can't find a workaround for palette pngs. I've fixed the
reader and it seems to work now, on your test images anyway. Patch
here:
https://github.com/jcupitt/libvips/commit/0dfd37b036091850529d29091e80bfc3e305fc68
John
On 18 March 2011 15:01, Bryan Tong Minh <[log in to unmask]> wrote:
> Hi John,
>
>
> On Fri, Mar 18, 2011 at 3:50 PM, <[log in to unmask]> wrote:
>> It's working, but it sets pixels to 0 or 1 for black and white. When
>> you shrink, these tiny differences get smoothed out. If you load the
>> image in nip2 you can use the display control bar to see the detail.
>>
>> I'll add something to make the png reader set pixels to 0 or 255 for
>> 1-bit images, but in the meantime, you can do:
>>
>
> Thank you for the answer! The workaround is working for 1 bit images.
> Do you also know a workaround for palette based 8-bit PNGs? e.g.
> http://upload.wikimedia.org/wikipedia/commons/3/31/A_large_blank_world_map_with_oceans_marked_in_blue-edited.png
>
>
> Best regards,
> Bryan
>
|