question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packed JPGs are exported as PNG with filename and mime type JPG

See original GitHub issue

When using a .blend file with packed images in JPG format, they are exported as PNG (making them much bigger). Also in this case it looks like the mime-type in the glTF file is image/jpeg, which is correct, just the actual exported image files are in PNG (even though their file extension is .jpg).

Example (2.80): FuseZombie.zip

You can use: File > External Data > Unpack All Into Files inside blender to get the expected JPGs.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
donmccurdycommented, Feb 26, 2019

I haven’t looked at how this is implemented in the this repo yet, but see this code from the old exporter:

https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/992b493456abba7e4d45d78f24c8b2a48e8a5a85/scripts/addons/io_scene_gltf2/gltf2_create.py#L340-L421

In particular, note the comment on blender_image.save_render, and the fact that it unfortunately applies Scene settings like exposure to the texture output (https://github.com/KhronosGroup/glTF-Blender-Exporter/issues/184).

My only strong preference here is that if an image can be left alone, it should be left alone. If the user gives us a PNG that doesn’t need to be repacked, we don’t repack it. This way, at least, we preserve the option for the user to do their packing and compression in another tool. In general I think that’s better than trying to intuit the correct format and compression settings.

0reactions
aerialglasgowcommented, Aug 12, 2021

Thanks @scurest Totally, it did dawn on me earlier importing another image, I had missed the ‘Use Alpha’ checkbox. Yes could be more intuitive on export, thanks for point this out. What an amazing app Blender is. Slowly getting to grips with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export documents, layers, and artboards in Photoshop
Export artboards, layers, layer groups, or documents as JPEG, GIF, PNG, or SVG image assets. Exporting image content in the format specified ...
Read more >
File formats/Images - Jmol wiki
File Formats for Images Exported from Jmol ... and filename, as well as the format in the Image Type drop-down list; choose among...
Read more >
JPEG - Wikipedia
The MIME media type for JPEG is image/jpeg, except in older Internet Explorer versions, which provides a MIME type of image/pjpeg when uploading...
Read more >
Name artboard is not added to the file name when exporting ...
When executing the command "File - Export file as" and exporting, for example, to jpg, the name artboard 3 "preview" is not automatically ......
Read more >
Export to PDF, Centered Images are not included in .pdf file
CONFSERVER-39503 - Missing images in Space/Page PDF export when images align="center" in ... ri:filename="image.jpg"><ri:page ri:content-title="Images Page" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found