-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support for chroma subsampling other than 4:2:0 #6
Comments
Could you please provide a sample code and image to reproduce the issue? |
Here's the code:
|
@shibaev |
Did you attach the chromatestInput.jpg? It looks that the only attachment https://user-images.githubusercontent.com/42567361/88899292-8ba3a700-d256-11ea-9060-0719a61e9ada.jpg corresponds to chromatestOutput.jpg. Also please clarify what is expected result for you? I.e. what is wrong with the https://user-images.githubusercontent.com/42567361/88899292-8ba3a700-d256-11ea-9060-0719a61e9ada.jpg image. |
The attached image is an input image (it was meant to appear a line above) |
Thank you for your explanation. Currently, LibJpeg.Net only supports 2x2 (4:2:0) and 1x1 (4:4:4) subsampling levels. You can produce 1x1 output using these lines: var comp0 = cmpStr.Component_info[0];
comp0.V_samp_factor = 1;
comp0.H_samp_factor = 1; Other variations are currently not implemented. Look at jpeg_fdct_*x* methods in /LibJpeg/Classic/Internal/jpeg_forward_dct.cs However, the original libjpeg supports other subsampling levels. You can look at the latest version from http://www.ijg.org/. Unfortunately, this feature has a low priority for us. We would appreciate a pull request that:
|
I have tried compressing a raw 24 bpp image represented by an byte array,
I have tried both the JpegImage API and the low level jpeg_compress_struct structure,
I even tried changing the internal jpeg_set_colorspace_SET_COMP() values
i either get 4:2:0 chroma image or "Not implemented exception"
my input colorspace is RGB
my output colorspace is YcBcR
The text was updated successfully, but these errors were encountered: