Quoth [email protected]:
> Hello 9fans,
> For me, jpg(1) can't display most jpeg images I have.  So I made a go
> program that convert a jpeg image from stdin to a png image to stdout.
> Assume that Plan 9's png is not broken ;)
> 
> To test, go to https://thuychi.vn/anh.html
> Of 50 images, Plan 9's jpg could only decode 3.  The go library can
> decode all of them.
> 
> I hope that there will be go image/plan9 and a draw library that works
> on Plan 9 too...  Replace the jpg(1) programs with the Go version!
> 
> bind /bin/jpgtopng.rc /bin/jpg, I think at least abaco don't need to
> be modified.
> 

Great, I think you just reminded me of an old bug in jpg that I'd
been looking into (and then got distracted from). It looks like when
we decode jpg images, we mishandle progresive jpgs that have scans
that don't use interleaving, and have subsampled components. These
aren't too common, but you'll run across them in the wild.

Normally, we'll end up with the luminance channel coming through,
but the chroma channels completely broken.

Now that I'm looking at it again, I think this has something to do
with how we walk the scans; data either comes in MCU or scan order,
and we may be mangling this.

this may not be so hard to fix.


------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T33c04c0193c96a35-M4abcef84f451b3005d64c1c0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to