[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Reading images

From: Pete French
Subject: Re: [RFC] Reading images
Date: Sun, 21 Sep 2003 14:31:29 +0100

> Is this OK? If so, I can update the existing code and implement it in
> back-art.

This sounds great.

> To those who want to use it, I want to warn that the results of this are
> fairly device-dependent. Doing image manipulation this way is not a good
> idea. Even just drawing an image to an off-screen window and reading it

But this has always been the case with OpenStep systems hasnt it ? I
assume it still works this way under OSX in fact.

> * The device might not be 72 dpi (in that case, the size in pixels of
> the returned image will not be the same as the original image).

If you draw an image into an offscreen window without changing
the scale then it should come out at 1;1 though. Drawing into a scaled
offscreen window is something I've used to rescale images in the past.
For example, the primary use I have for this is in mapping - I want
to take a 2D map and drape it over a 3D framework. But to do texture
mapping in OpenGL toy need an image as a power of 2. Simplest solution
is to create an offscreen window of 1024x102, draw into it and then get
the data back. Which gives you watever date you wanted to drape as
a 1024 square grid.

i.e. its a feature rather than a problem :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]