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

Gamma or brightness appears wrong after encoding. #11

HSGorman opened this issue Jul 19, 2016 · 3 comments


None yet
3 participants
Copy link

commented Jul 19, 2016

Using the following code to convert a jpg to a jp2. When I read the jp2 the image appears too light (brightness or gamma appear to be off). Any ideas?

using (var bitmap = (Bitmap)Image.FromFile(@"C:\temp\jp2\llb.jpg"))
var enc = J2kImage.ToBytes(bitmap);
File.WriteAllBytes(@"C:\temp\jp2\llb.jp2", enc);


This comment has been minimized.

Copy link

commented Jul 22, 2016

@HSGorman Many thanks for reporting! Could you please include a sample image with this problem?


This comment has been minimized.

Copy link

commented Mar 17, 2017

@HSGorman Could be related to the failure to properly display the logo (file14) in codectest. But it would be good to have the sample as well.


This comment has been minimized.

Copy link

commented Jul 14, 2019

same here.
got a very bright an contrasted image after converting to jp2.
is there a fix?
i attached the sample (original file and converted one)

here is the code i used:
System.Drawing.Image image = System.Drawing.Bitmap.FromFile("c:\img.jpg");
byte[] j2kArray = CSJ2K.J2kImage.ToBytes(image);
File.WriteAllBytes("c:\newImage.jp2", j2kArray);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.