Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anders9ustafsson opened this issue Jan 20, 2016 · 4 comments

Comments

@anders9ustafsson
Copy link
Collaborator

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 [email protected] on 3 Mar 2009 at 12:48

Copied from original issue: #5

@anders9ustafsson
Copy link
Collaborator Author

From @GoogleCodeExporter on January 20, 2016 12:59

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

Original comment by [email protected] on 8 Apr 2009 at 11:21

Attachments:

@anders9ustafsson
Copy link
Collaborator Author

From @GoogleCodeExporter on January 20, 2016 12:59

Will make sure this is fixed ASAP.

Original comment by [email protected] on 23 Apr 2009 at 6:41

  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@anders9ustafsson
Copy link
Collaborator Author

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 [email protected] on 8 Aug 2014 at 2:24

@anders9ustafsson
Copy link
Collaborator Author

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 [email protected] on 24 Dec 2014 at 2:41

@anders9ustafsson anders9ustafsson changed the title Encoding a 8-bit Grayscale jpg fails (colorspace conversion bug) | Resubmit GC-5: Encoding a 8-bit Grayscale jpg fails (colorspace conversion bug) | Resubmit Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant