Graphics DrawImage() drawing a different size

P

Peter Oliphant

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==]
 
P

Peter Oliphant

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 said:
something to do with DPI perhaps?

Peter Oliphant said:
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==]
 
P

Peter Oliphant

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

[==P==]

Peter Oliphant said:
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 said:
something to do with DPI perhaps?

Peter Oliphant said:
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==]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top