• 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: CGImageRef printing issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGImageRef printing issue


  • Subject: Re: CGImageRef printing issue
  • From: Mirko Viviani <email@hidden>
  • Date: Fri, 13 Nov 2009 10:27:06 +0100

On 12/nov/2009, at 23.46, David Duncan wrote:

> Just like with all CGContexts you can apply a transform matrix to change the coordinate system. However in general this isn't necessary. If you want an image to display in a 1" x 1" area on screen, draw it into a 72x72 box. The pixel size of the image will determine DPI. If you wanted to draw a 1" image at 300 DPI then you would just need a 300x300 image drawn into a 72x72 box. If you wanted to draw a 1" image at 600 DPI then you would need a 600x600 image drawn into the same 72x72 box.

To be honest I didn't remember the resolution indipendent thing, but I was supposing something similar
since drawing my image in tiles on this context resulted with gaps !
But I was not able to obtain the scale factor of the printing context so I didn't understand.

CGContextConvertSizeToDeviceSpace() does not seem to correctly convert my paperSize
(from NSPrintInfo) to device space. (see below)
I need this information because I want to scale an image (ie 500 Mpx) to a reasonable size instead of
crashing my app! :)

I haven't checked the context transform matrix yet, but which route should I follow to obtain this information?


Preview printing view:

paperSize={595.00 842.00} devicePaperSize={212.70 -301.00}

PDF:

paperSize={595.00 842.00} devicePaperSize={595.00 842.00}

Canon printer:

paperSize={595.00 842.00} devicePaperSize={595.00 842.00}


Thank you!

--
Ciao,
Mirko

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CGImageRef printing issue
      • From: David Duncan <email@hidden>
References: 
 >Re: CGImageRef printing issue (From: Mirko Viviani <email@hidden>)
 >Re: CGImageRef printing issue (From: David Duncan <email@hidden>)

  • Prev by Date: Re: [Q] copy operation and authorization
  • Next by Date: Re: [Q] copy operation and authorization
  • Previous by thread: Re: CGImageRef printing issue
  • Next by thread: Re: CGImageRef printing issue
  • Index(es):
    • Date
    • Thread