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

Blender 2.82a glTF 1.2.18 Exports PSD as JPG, there is no PNG option any more #986

Closed
Joel-Hjerten opened this issue Mar 19, 2020 · 1 comment · Fixed by #998
Closed
Labels
exporter This involves or affects the export process Material

Comments

@Joel-Hjerten
Copy link

Joel-Hjerten commented Mar 19, 2020

Annotation 2020-03-19 043449

Blender 2.82a with Manually updated glTF Exporter 1.2.18 from Blender 2.83 (1.2.18) as well as the downloaded 1.2.48 from git repo.

Need the exported textures to be in PNG format from my working PSD textures, can't have them being saved to JPG as we need to do arbitrary post export compression of textures to work within our games size limits.

Bug Blender 2.82a glTF 1.2.18 Exports PSD as JPG, there is no PNG option any more.zip

@scurest
Copy link
Contributor

scurest commented Mar 25, 2020

This was changed by #882.

It seems that though Blender can open PSDs, internally it treats it as a JPEG, which is why the exporter treats it like one. If you check the image.file_format field it's 'JPEG', if you go to "Save As" Blender will try to save it as a JPEG, etc.

edit: apparently the file_format field is only "the format it's re-saved as", not what the image actually is :/

What we could do is check if the image came from a file and that file ends in .psd/.PSD, and use PNG in that case.

This also means it's possible to have an image that's JPEG format, but whose file on disk isn't a JPEG. Will need to check that that's handled correctly...

@julienduroure julienduroure added exporter This involves or affects the export process Material labels Mar 25, 2020
julienduroure added a commit that referenced this issue Apr 11, 2020
Export: less naive file format detection (fix #986)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter This involves or affects the export process Material
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants