Comments (11)
Hello,
The library we use to save jpeg images does not allow setting exif metadata (including DPI) on the image. Please note that the DPI is purely a meta-information, and has nothing to do with the actual quality of the image.
If you really want to set the DPI (I'd be curious to know what your use-case is), you can do it with, for instance, exiftool:
exiftool -XResolution=300 -YResolution=300 -ResolutionUnit=inches -overwrite_original your_image.jpg
A more interesting feature would be to allow the user to specify the quality parameter that is passed to the JPEG encoder for the final image creation (this feature was recently added to gapdecoder). If you are interested in that, feel free to open another issue.
from dezoomify-rs.
Ok, I'm reopening this, then !
Currently, the libraries we use do not have support for custom DPIs, but that's changing :
- I proposed a change to allow writing density information and it got accepted in image-rs/image#1078
- Someone proposed a similar change for reading density information in image-rs/jpeg-decoder#115
from dezoomify-rs.
dezoomify-rs uses what is called a software library to read and write JPEG files. The code of this library is not specific to dezoomify-rs, but is shared with many other projects. Once a new version of the library is released, and adds functions to read and write pixel density information, we will be able to use these functions to implement the functionality you wanted in dezoomify-rs. This may take a long time.
from dezoomify-rs.
If your request was indeed about DPI meta-information that is lost during dezooming and not image quality, then you can re-open this issue.
from dezoomify-rs.
Thank You very much, @lovasoa for Your promptness and for having kindly reported me about ExifTool and the system to recalibrate the parameters ...
exiftool -XResolution=300 -YResolution=300 -ResolutionUnit=inches -overwrite_original your_image.jpg
... although in substance it took almost half a day π to understand how it worked both for a single image and for a whole folder, now I know how to correct the DPI problem. Anyway, I know that DPI is a meta-info and has nothing to do with images' quality.
You also write:
If your request was indeed about DPI meta-information that is lost during dezooming and not image quality, then you can re-open this issue.
I don't know whether to do it or not: what I regret is that the original DPI.
from dezoomify-rs.
What exactly do you need the dpi information for ?
from dezoomify-rs.
The people I work with are meticulous: if maps are available at 300 dpi, they prefer that; and, since Milan & Venice State Archives have upload them at 300 dpi, I wanted to rectify this metadata.
from dezoomify-rs.
I'm glad to have aroused so much interest in the GitHub community, @lovasoa.
But I was wondering: since I understand very little about computer science, in the light of the threads mentioned by You above, how will dezoomify-rs changeπ€? You've write that the idea to allow writing density information was accepted in image-rs/image#1078.
from dezoomify-rs.
Okay, that's fine @lovasoa: in the meantime that You experts π§ work on the software library, I'll use exiftool, as kindly indicated from You. Thanks and good work to everyone!
from dezoomify-rs.
Any update on this? :)
from dezoomify-rs.
The image library that we use, image-rs does not have any generic support for meta-information on image files. It can write DPI information (on jpeg files only), but not read it.
@Boscop: If you want to add support for this, the work starts in these external libraries: image-rs, jpeg-decoder, and other image format libraries if we want to support this feature for them too.
from dezoomify-rs.
Related Issues (20)
- Birmingham Museum and Art Gallery HOT 1
- krpano Issue HOT 1
- Add a PyO3 wrapper? HOT 1
- archives.lamayenne.fr HOT 1
- Can't use as a lib HOT 1
- Van Gogh Museum, Amsterdam : A new problem. HOT 1
- uline.com HOT 2
- Dezoomify for Micr.io HOT 1
- add support for etomesto.ru HOT 16
- Image have 'no name' HOT 1
- Add an option for incompletely downloaded files HOT 1
- support output directory HOT 1
- custom image format suffix (support invalid iiif manifests) HOT 3
- Dezoomify doesn't work on https://www.clevelandart.org/art/collection/ HOT 1
- Dezoomify doesn't work on https://guernica.museoreinasofia.es/gigapixel/#3/63.11/-120.59 HOT 1
- Dezoomify doesn't work on https://collection.barnesfoundation.org/objects/7199/Le-Bonheur-de-vivre-also-called-The-Joy-of-Life/ HOT 4
- Download multiple images at once HOT 1
- compass maps HOT 3
- Solved
- Dezoomer doesn't work with https://www.artic.edu/artworks/ HOT 3
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 dezoomify-rs.