TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
eddie_jordan
NA
1
0
GDI+ and drawing on a Transparent PNG
Mar 17 2005 10:13 AM
Hi, There has been a lot of great tutorials written on this subject, however they all seem to work with JPGs. I myself have no difficultly drawing on a JPG, however when I try to draw on a PNG the drawing will not show up. I have tried numerous things, my code looks like the following: Image image( txtString ); IMAGE_WIDTH = image.GetWidth(); IMAGE_HEIGHT =image.GetHeight(); graphics.DrawImage(&image, 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT ); Graphics imageGraphics(&image); DrawRoute(&imageGraphics); // this function draws lines on the first image. graphics.DrawImage(&image, 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT); SaveImage(&image); The lines are drawn with Pens and Brushes that specify ARGB values, with A being 255, though I tried change the alpha levels, but that doesn't help. I've noticed one thing strange, if I take the PNG into photoshop and drop the the fill level or the opacity level by 1, the PNG will then work perfectly.. I have also tried the ColorMatrix and ImageAttributes etc.. however this doesn't look very good in what I'm trying to do.. why can't I just draw directly on top of the image like a JPG? Any help is appreciated.. Thanks in advance, Edward.
Reply
Answers (
2
)
How to do Multiple view using MapViewOFFile API .
in Visual C++.NET .....