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==] 3 2549
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==]
> 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==]
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==]
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeroen Ceuppens |
last post by:
Hi,
When i do this in my programma, in the contstructor of the form:
g.DrawImage(i,new
Rectangle(0,0,i.Width,i.Height),0,0,i.Width,i.Height,GraphicsUnit.Pixel);
it doens't paint it ;( but if...
|
by: Mark Johnson |
last post by:
Using: VS 2003 NET C# for Framework and Framework Compact
Trying : Moving a Card (Bitmap) as in Solitare (PC + WinCe) Version on
OnMouseMove
Problem : The affected drawing Area by Invalidate (or...
|
by: Tamer Abdalla via DotNetMonster.com |
last post by:
Hello, everyone!
I DO need some help in order to understand how to create graphics in VB.NET.
I'm a little bit confused... I once knew a time when using Point & PSet was
almost the only way to...
|
by: placid |
last post by:
Hi all,
This is the following code i have,
Public Class Form1
Inherits System.Windows.Forms.Form
Dim A, B, c, U, x, y As Double
Dim Red, Green, Blue As Integer
|
by: Frijoles |
last post by:
Hello,
I have a function that accepts an Image as the input. Currently, I load a
bitmap in the calling class and pass that in. I'd like to create an overlay
with another image and then pass the...
|
by: Blasting Cap |
last post by:
I have to change the front page for a sales system I work on, and want
to use some thumbnails of wallpaper that is on a sister site.
The wallpapers are jpegs, and are 640, 800, 1024 & 1280 in...
|
by: rayreeves |
last post by:
If I look for guidance on this topic I find simple examples like this:
public class Form2:Form {
public Form2() {
this.Text = "FORM2";
this.Size = new Size(450,400);
this.Paint += new...
|
by: koschwitz |
last post by:
Hi,
I hope you guys can help me make this simple application work. I'm
trying to create a form displaying 3 circles, which independently
change colors 3 times after a random time period has...
|
by: drsmooth |
last post by:
Hi, i have made several different things using a double buffer and a jframe before but never had this problem:
if you look thrugh the code, you can see that i draw a whole bunch of stuff to the...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |