• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Preview and "Respect Image DPI for Actual Size"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview and "Respect Image DPI for Actual Size"


  • Subject: Re: Preview and "Respect Image DPI for Actual Size"
  • From: John Stiles <email@hidden>
  • Date: Wed, 7 Dec 2005 10:17:49 -0800

On Dec 7, 2005, at 3:43 AM, Heinrich Giesen wrote:

On 07.12.2005, at 02:30, John Stiles wrote:

We would like these images to appear unscaled on the
user's monitor, since the scaling leaves jaggy artifacts which look
bad. To that end, we have been trying to set the image's DPI to match
the screen DPI.

This does not avoid scaling. Assuming the screen resolution is 72 dpi
the image is not scaled if [theRep size.width]==[theRep pixeldWide]
(same with height). If you see jaggies due to scaling then your imageRep
has not a resolution of 72 dpi. Check it out:

- (float) dpiX { return 72.0*[theRep pixelsWide]/[theRep size].width; }
- (float) dpiY { return 72.0*[theRep pixelsHigh]/[theRep size].height; }

OK, using QuickTime exporters, do you know how generate a JPG or PNG where the "pixelsWide" will equal the "size"? I don't know how to influence those criteria with the tools at my disposal.

We also noticed that PNGs were reporting oddball sizes like "72.007
DPI" in Preview's Get Info panel. I don't know why that might be;
we're definitely passing "72 << 16" for our DPI size. JPEGs didn't
have this problem.

In PNG-images the resolution is measured in dots per meter, which leads
to "rounding errors": 72 dots per inch = 72/2.54 * 100 ) dots per meter
(= 2834.646 dots per meter).

Oh, interesting.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Re: Preview and "Respect Image DPI for Actual Size" (From: Heinrich Giesen <email@hidden>)

  • Prev by Date: Re: Preview and "Respect Image DPI for Actual Size"
  • Next by Date: Re: CoreRecipeApp sample broken after 10.4.3 update
  • Previous by thread: Re: Preview and "Respect Image DPI for Actual Size"
  • Next by thread: CoreRecipeApp sample broken after 10.4.3 update
  • Index(es):
    • Date
    • Thread