Can't read metadata data (EXIF) information in JPEG files #84661
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#84661
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67
Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash:
0f45cab862
Worked: (newest version of Blender that worked as expected)
Short description of error
A bit of context first, I setup a Node group that helps me scale textures to real world scale. So I use the images DPI or PPM for this. Thus I scripted the inputs for the Node groups to automatically grab the relevant information.
It works fine with PNG and TIF but not with JPEG. I use the script below to gather the DPI. For JPEGs, I get the wrong DPI, 72 dpi (2834.646 ppm). Even if the correct value should be higher, blender always displays 72dpi.
To overcome this, I added a python module ExifRead. There are others. This was arbitrary.
Now, I have the function to gather the correct DPI. Except it complicates the code... :)
Also, don't know if its my environment (work office) that is the issue, firewall and etc... I could not install the module over the internet using the pip function in python. I had to install using the wheel file. not a major issue.
Exact steps for others to reproduce the error
Run
bpy.data.images["300dpi.jpg"].resolution
Added subscriber: @CharlesSemeon
Added subscriber: @rjg
It seems that this isn't set for JPEG. In a cursory search in the source code only *.png, *.exr, *.tif and *.bmp seem to set the
ppm
on theibuf
which is used for theresolution
property. From my current understanding this is a missing feature, but given that the Python API doesn't indicate that theresolution
may not have been loaded from the files metadata, this could also be considered a bug.This issue was referenced by
6f88053d85
Added subscriber: @lichtwerk
D10166 looks like it does the trick, not 100% sure though.
Changed status from 'Needs Triage' to: 'Confirmed'
Since we have a patch, will confirm for now.
Changed status from 'Confirmed' to: 'Resolved'
Hello, I am not sure it this is the place for me to post update on the issue.
I was a happy bunny when this was resolved but it does not work on all JPEGs.
I attached the image that does not retrieve the DPI. Also, to make it work I have to re-save in another program (irfan view) when I re-save in Photoshop the problem persist.
Changed status from 'Resolved' to: 'Needs Triage'
Changed status from 'Needs Triage' to: 'Needs User Info'
Had a look and in contrast to
300dpi.jpg
[which has itsdensity_unit
set to 1 correctly -- 1 corresponds to dots/inch], the other file you providedRED_300dpi.jpg
has itsdensity_unit
set to 0 [0 corresponds to 'unknown'].In case of 'unknown', there is not much we can/should do?
If I resave
RED_300dpi.jpg
from Gimp, it then has itsdensity_unit
set correctly to 1.Does this help possibly?
https://community.adobe.com/t5/photoshop/how-to-export-a-jpeg-with-300dpi-ps-keeps-exporting-at-96dpi-even-though-image-res-is-set-to-300px/td-p/8146131
Thanks for the reply.
The adobe community page does not solve the problem. Adobe still doesn't save with a density unit of 1.
So I will have to put warning signs to not use JPEGs in the setup. :)
Changed status from 'Needs User Info' to: 'Resolved'
Hi @CharlesSemeon .
This is a bit unfortunate, but I guess there is really not much we can do here.
Sorry to say, but will close again.
If you get any updates fro the Adobe side (or other information that would let us proceed on our side, please let us know!)
Hello Philipp,
Not much of an update. Below is an answer I got from the Adobe community.
I tried to prove the information by looking for modules that can read JFIF. BUT I can not advance enough for this. I'll just stick to moving vertices.... :)
Hope this helps.
Regards,
Charles