By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,869 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,869 IT Pros & Developers. It's quick & easy.

Graphics DrawImage() drawing a different size

P: n/a
I'm importing a jpeg via:

Bitmap* image = new Bitmap( filename ) ;

Then, using the Drawing::Graphics object, I execute DrawImage( image, x,
y ). My problem is that the original image was 200x200, but it's drawing
something smaller (something like 130x130, about 2/3 the original size). I
am using transforms, but I've verified that scaling is set to 1.0 on both x
and y axis.

What could be changing the drawing size from the bitmap original size?

[==P==]
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
something to do with DPI perhaps?

"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:eL**************@TK2MSFTNGP09.phx.gbl...
I'm importing a jpeg via:

Bitmap* image = new Bitmap( filename ) ;

Then, using the Drawing::Graphics object, I execute DrawImage( image, x,
y ). My problem is that the original image was 200x200, but it's drawing
something smaller (something like 130x130, about 2/3 the original size). I
am using transforms, but I've verified that scaling is set to 1.0 on both
x and y axis.

What could be changing the drawing size from the bitmap original size?

[==P==]

Nov 17 '05 #2

P: n/a
> something to do with DPI perhaps?

I checked into that and no, that wasn't the problem in my particualr case
(but good idea). What it DID have to do with is my accidentally trying to
solve the problem in two places, which had a combined affect (i.e., it was
my mistake...hehe). It works fine now, even have the ability to scale and
rotate any image.

Now if only I could figure out how to get a TRUE transparent color to turn
an image into a 'sprite'. So far my attempts to make an image or bitmap
transparent has only result in making pixels of a certain color change to
the same color as the backcolor of the image's parent, which is not true
transparency. I've tried using MakeTransparent, and setting the backcolor to
the 'system transparent' color, and playing with TransparentKey. I've even
tried setting the backcolor to an alpha=0 color.

[==P==]

"Lloyd Dupont" <net.galador@ld> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
something to do with DPI perhaps?

"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:eL**************@TK2MSFTNGP09.phx.gbl...
I'm importing a jpeg via:

Bitmap* image = new Bitmap( filename ) ;

Then, using the Drawing::Graphics object, I execute DrawImage( image, x,
y ). My problem is that the original image was 200x200, but it's drawing
something smaller (something like 130x130, about 2/3 the original size).
I am using transforms, but I've verified that scaling is set to 1.0 on
both x and y axis.

What could be changing the drawing size from the bitmap original size?

[==P==]


Nov 17 '05 #3

P: n/a
Once again, I'm a dummy. Got true transparancy to work using
MakeTransparent. Not sure why it now works, but coooool! : )

[==P==]

"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
something to do with DPI perhaps?


I checked into that and no, that wasn't the problem in my particualr case
(but good idea). What it DID have to do with is my accidentally trying to
solve the problem in two places, which had a combined affect (i.e., it was
my mistake...hehe). It works fine now, even have the ability to scale and
rotate any image.

Now if only I could figure out how to get a TRUE transparent color to turn
an image into a 'sprite'. So far my attempts to make an image or bitmap
transparent has only result in making pixels of a certain color change to
the same color as the backcolor of the image's parent, which is not true
transparency. I've tried using MakeTransparent, and setting the backcolor
to the 'system transparent' color, and playing with TransparentKey. I've
even tried setting the backcolor to an alpha=0 color.

[==P==]

"Lloyd Dupont" <net.galador@ld> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
something to do with DPI perhaps?

"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:eL**************@TK2MSFTNGP09.phx.gbl...
I'm importing a jpeg via:

Bitmap* image = new Bitmap( filename ) ;

Then, using the Drawing::Graphics object, I execute DrawImage( image, x,
y ). My problem is that the original image was 200x200, but it's drawing
something smaller (something like 130x130, about 2/3 the original size).
I am using transforms, but I've verified that scaling is set to 1.0 on
both x and y axis.

What could be changing the drawing size from the bitmap original size?

[==P==]



Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.