[Vm-dev] JPEGReadWriter2Plugin

David T. Lewis lewis at mail.msen.com
Fri Oct 8 20:12:36 UTC 2010


On Mon, Sep 27, 2010 at 05:22:43PM +0200, Bert Freudenberg wrote:
> 
> Hi,
> 
> have there been changes lately to the jpeg plugin?
> 
> On a Mac 4.2.4 VM I see an off-by-one error, all pixels are moved to the right, the first pixel is transparent. On a Mac 5.8.1 Cog VM it works as expected though.
> 
> Here's my little test:
> 
> (JPEGReadWriter2 formFromStream: #[16rFF 16rD8 16rFF 16rE0 16r00 16r10 16r4A 16r46 16r49 16r46 16r00 16r01 16r01 16r01 16r00 16r48 16r00 16r48 16r00 16r00 16rFF 16rDB 16r00 16r43 16r00 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rFF 16rC2 16r00 16r0B 16r08 16r00 16r01 16r00 16r01 16r01 16r01 16r11 16r00 16rFF 16rC4 16r00 16r14 16r10 16r01 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16rFF 16rDA 16r00 16r08 16r01 16r01 16r00 16r01 16r3F 16r10] readStream) bits first hex
> 
> On 5.8.11 I get 16rFF808080 as expected, on 4.2.4 I get 0.

Bert,

I adopted the Cog version of the plugin as of VMMaker-dtl.191, so the
the two branches are identical now and problem will be gone from future
versions of the VM.

John, can you please check these two methods:
  JPEGReaderWriter2Plugin>>primJPEGReadImage:fromByteArray:onForm:doDithering:errorMgr:
  JPEGReaderWriter2Plugin>>primJPEGWriteImage:onByteArray:form:quality:progressiveJPEG:errorMgr:

By adopting the Cog version, I lost some changes that you made to these
two methods earlier this year. However, I suspect that the parameter
type declarations that had been added in the oscog version (but missing from
vmmaker trunk) may have addressed the same issues so possibly no additional
updates are required.

Thanks,
Dave



More information about the Vm-dev mailing list