AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi [GR32] How to get image resolution
Thema durchsuchen
Ansicht
Themen-Optionen

[GR32] How to get image resolution

Ein Thema von WojTec · begonnen am 9. Apr 2010 · letzter Beitrag vom 10. Apr 2010
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

[GR32] How to get image resolution

  Alt 9. Apr 2010, 19:36
Hello guys,

I have small problem with something that probably is very simple. So, I have image in TBitmap32 object and must save it. When I saving it as JPEG I also updating or adding EXIF metadata. One of EXIF field is picture resolution (and second in thumbnail section). How to compute this resolution (the best in inches)?
  Mit Zitat antworten Zitat
Benutzerbild von rollstuhlfahrer
rollstuhlfahrer

Registriert seit: 1. Aug 2007
Ort: Ludwigshafen am Rhein
1.529 Beiträge
 
Delphi 7 Professional
 
#2

Re: [GR32] How to get image resolution

  Alt 9. Apr 2010, 20:28
To get the resolution in inches you need to know how to compute your inches. Some Images have 120 px/inch and some have 96 px/inch. I think, you can get this factor by reading it from its original file. If you create a Bitmap im your TBitmap32 (like Painting) you can choose a factor. Usually it'S 96 or 120.

Hope I could help.

Bernhard

EDIT: I've tested thin with MSPAINT and the result-image has a resolution of 96 px/inch (=dpi) (see attached screenshot)
Miniaturansicht angehängter Grafiken
screenshot_777.png  
Bernhard
Iliacos intra muros peccatur et extra!
  Mit Zitat antworten Zitat
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#3

Re: [GR32] How to get image resolution

  Alt 9. Apr 2010, 20:48
N'Abend,

is does not make any sense do put the resolution px/inch into the exif.
The resolution is depending on the device where the image will be displayed or printed.

The screen resolution is between 72 and 96px/inch.
A printer can have a resolution of 150,300 or 600 dots(px)/inch.

So an image with an width of 1000 pixels has width on the screen of round about 10 inches.
Printed it is physicaly much smaller.

Hope it helps.

Klaus
Klaus
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#4

Re: [GR32] How to get image resolution

  Alt 10. Apr 2010, 18:47
Thanks for answers. I decided to don't save DPI or remove if exists. Thanks guys
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:42 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz