Re: Drawing to NSImage to create image data at different resolutions
Re: Drawing to NSImage to create image data at different resolutions
- Subject: Re: Drawing to NSImage to create image data at different resolutions
- From: Antonio Nunes <email@hidden>
- Date: Thu, 12 Apr 2007 12:05:17 +0100
On Apr 11, 2007, at 3:35 PM, Antonio Nunes wrote:
I am drawing to an NSImage (using lockFocus on the image) and then
write it's TIFFRepresentation to disk. This is fine to create a 72
dpi graphic. However I would like to be able to create the image at
a user defined resolution. Is there an easy way to accomplish this,
or should I use a transform to scale the graphics context up (or
down) before drawing and then, after capturing all the drawing,
adjust the size of the imageRep to obtain the desired resolution?
Hmmm, maybe I asked a silly question, or this has been discussed on
this list before and I failed to find the relevant threads, or it is
featured in the docs yet I managed to overlook it. Let me reformulate:
I want to capture some drawing that is normally performed to draw to
the screen or to print or to produce PDF output (the differences are
minimal), and produce a graphic from that drawing at n-dpi, then save
that graphic to disk. How can I control the resolution at which the
drawing is captured/the resolution at which the graphic is created?
Maybe using NSImage is not the best way to go?
Cheers,
António
-----------------------------------------------------------
And could you keep your heart in wonder
at the daily miracles of your life,
your pain would not seem less wondrous
than your joy.
--Kahlil Gibran
-----------------------------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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