briandonahue / FluxJpeg.Core

Clone of fjcore library that seems to be stagant on google code
http://code.google.com/p/fjcore/
20 stars 10 forks source link

GC-5: Encoding a 8-bit Grayscale jpg fails (colorspace conversion bug) | Resubmit #11

Open anders9ustafsson opened 8 years ago

anders9ustafsson commented 8 years ago

From @GoogleCodeExporter on January 20, 2016 12:59

What steps will reproduce the problem?
1. Try to encode a 8-bit Grayscale jpg

What is the expected output? What do you see instead?
Expected: Encoded image.
Actual: IndexOutOfException on Encoding (Line 261, "CompressTo"-method).

What version of the product are you using? On what operating system?
Original version (v1.0?) on. Vista Business SP1

Please provide any additional information below.
This is a Resubmit with more info. I first reported it as a comment on 
issue 1:

---
Comment 1 by snakeware95, Feb 03, 2009
Also there is a bug in the JpegEncoder constructor converting (8-bit) 
Grayscale images.

Replace:
_input.Image.ChangeColorSpace(ColorSpace.YCbCr);

With this to fix:
_input = new DecodedJpeg(_input.Image.ChangeColorSpace(ColorSpace.YCbCr), 
_input.MetaHeaders);

---
Comment 3 by jeff.powers, Feb 19, 2009
snakeware95: the colorspace change happens in-place so I
think that edit isn't needed.  resubmit a bug if problems remain.

---
The colorspace change itself is not the problem, but the properties of the 
surrounding DecodedJpeg (BlockWidth array f.e.) are not updated (still 1 
component). So when you loop over them using the Image.ComponentCount 
(which is 3 after the conversion) in "CompressTo", you get an 
IndexOutOfException on Encoding (Line 261, "CompressTo"-method).

Please try it yourself!

Original issue reported on code.google.com by snakewar...@gmail.com on 3 Mar 2009 at 12:48

Copied from original issue: #5

anders9ustafsson commented 8 years ago

From @GoogleCodeExporter on January 20, 2016 12:59

Here is the file i decode, resize and re-encode.

Original comment by snakewar...@gmail.com on 8 Apr 2009 at 11:21

Attachments:

anders9ustafsson commented 8 years ago

From @GoogleCodeExporter on January 20, 2016 12:59

Will make sure this is fixed ASAP.

Original comment by jeff.pow...@gmail.com on 23 Apr 2009 at 6:41

anders9ustafsson commented 8 years ago

From @GoogleCodeExporter on January 20, 2016 12:59

Hi Jeff,
I am also facing the above issue of Encoding a 8-bit Grayscale jpg fails and 
not sure if issue has been fixed. Its very urgent for me our project is already 
in production and client are complaining about it. I have to get it fix as it 
is high priority for my client.
I am using FJCore.dll version 1.0.0.0. Is there any new version released?
How can I download latest FJCore.dll Or source code ?

Thanks,
Sejal

Hope to hear from you soon.

Original comment by viroja.s...@gmail.com on 8 Aug 2014 at 2:24

anders9ustafsson commented 8 years ago

From @GoogleCodeExporter on January 20, 2016 12:59

Hi Jeff,

I am writing you in order to follow up with the above issue. Are you going to 
accept an issue and find solution for it?
Hope to hear from you soon.

Thanks,
Sejal

Original comment by viroja.s...@gmail.com on 24 Dec 2014 at 2:41