-
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
Cannot change jpeg_width and jpeg_height without reflection #9
Comments
Please take a look at source code of The |
Just peeked at the code for The code path that could possibly reach
It just so happens that poking the private Another point of consideration is that for
Then |
I am not sure I follow. Could you please clarify what you suggest to do? |
I was working on a tool that let you losslessly merge two JPEGs together by putting one on top of the other. This can be done if they were saved with the same compression settings.
I did manage to get it working correctly, but I encountered one problem with the library when I had to save the JPEG file.
The problem happens when you call
jpeg_finish_compress
, it ignores the publicImage_width
andImage_height
fields. Instead, it uses the private fieldsjpeg_width
andjpeg_height
to determine what dimensions to use for the output file.In order to get the program to work, I needed to use reflection to write to those private members.
The text was updated successfully, but these errors were encountered: