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
saving an image with the image quality flag set to high or best causes empty jpegs. #569
Comments
I have assigned myself to try and reproduce this. |
I tried to reproduce this, but I can't. |
Have this problem in IOS. I can store an image like a PNG, but a JPG is always 0 bytes. |
@ikillbombs please post some code and/or detailed reproduction steps which show your problem. |
Used the imagePickerExample:
|
I think it is a memory problem. Some other code I use gives a memory error during the usage. |
Hi, I had similar problems related to saving images (although for me it doesn't save no matter what quality I set). I noticed two issues here: memory problems are probably caused by wrong GL_PACK_ALIGNMENT value, the following change in GLint prevAlignment;
glGetIntegerv(GL_PACK_ALIGNMENT, &prevAlignment);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
pixels.allocate(texData.width,texData.height,ofGetImageTypeFromGLType(texData.glType));
bind();
glGetTexImage(texData.textureTarget,0,texData.glType,GL_UNSIGNED_BYTE, pixels.getPixels());
unbind();
glPixelStorei(GL_PACK_ALIGNMENT, prevAlignment); As to empty JPEGs, I noticed that the alpha channel is the problem (you can render to an FBO with GL_RGB format to get rid of it). Sounds reasonable since JPEG doesn't support alpha, but the framework should at least warn you about this. |
Seems logical 👍 |
can't recreate this issue, closing unless @openframeworks/ios can reproduce (sounds like a platform-specific bug). |
No description provided.
The text was updated successfully, but these errors were encountered: