hi,

There is something I don't understand in the picture
resolution
and the Graphics.DrawPicture() method.
(same in PICT on the mac and BMP on Windows)
I have square PICT image at 400 dpi (PhotoShop
confirms that)
I know it's a 512x512 image

the (*Pic)->rect (in C) is 92x92 pixels;
at 100%, Photoshop draws it 512x512

here is my RB code

aPic = f.OpenAsPicture
resH = aPic.HorizontalResolution ' returns 400 dpi

rapportRes = resH/72

sizeH = aPic.Width * rapportRes
sizeV = aPic.height * rapportRes
    
Canvas1.Graphics.DrawPicture(aPic, 0, 0, sizeH, sizeV)
this line draws a 92x92 picture (does not scale at
all).
a zoom in duplicates the pixels and does not use the
400 dpi resolution

other exemple:
a big image 2366x1470 pixels, 150dpi

dim sizeH, sizeV as integer
zoom = zoom / 1.5
sizeH = Floor(aPic.Height * zoom)
sizeV = Floor(aPic.Width * zoom)
Canvas1.Graphics.DrawPicture(aPic, 0, 0, sizeH, sizeV,
0, 0, aPic.Height, aPic.Width)

these lines do scale the picture but within some
limits: sizeH and sizeV remain different but the the
picture drawn become squared (truncated).

I think I need some help
RB 2006 windows

jjc
Montreal


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to