Comments (1)
The problem has been nicely analyzed in php/php-src#10351 (comment) by @nielsdos. TL;DR: the actual JPEG doesn't have any density information, so libgd's default of 96 is reported. Additional information such as EXIF headers are not parsed by libgd, but that is already requested as #452 and #344.
If you need to get the resolution from the EXIF data in PHP, you could do:
$exif = exif_read_data($filename);
$xres = $exif["XResolution"]; // "2400000/10000"
$yres = $exif["YResolution"]; // "2400000/10000"
from libgd.
Related Issues (20)
- Binary Backup compatibility comment in gdImageStruct HOT 3
- Windows MSVC build issue on gd_webp.c HOT 5
- Missing libgd when building gem native extension HOT 2
- gdImageSetInterpolationMethod ignores GD_BICUBIC* HOT 3
- CMake: Inconsistent feature control HOT 9
- [DOC] cmake build dir HOT 4
- .saveAlphaFlag ignored when saving WebP or AVIF HOT 1
- gdImageClone crashes when cloning an instance that filled polygon HOT 2
- test-suite.log FAIL 3 HOT 5
- Is libgd.so.3 backward compatible with libgd.so.2 HOT 4
- Getting Issue With Nirmala UI Font [ Character Issue ] HOT 2
- `imageaffine()` does not seem to work correctly on GD 2.3.3 on an older PHP
- Linker error [Undefined symbols for architecture arm64/M1]!
- Any plan about a new release?
- Support libavif 1.0 in CMake build HOT 5
- Is libgd affected by CVE-2023-4863? HOT 2
- Support for .ico image format HOT 1
- Win64 static build - undefined ref in project
- Automatic Image Rotation Issue in Upright Images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgd.