.PNG problem
.PNG problem
.PNG problem
.PNG problem
.PNG problem
.PNG problem .PNG problem .PNG problem .PNG problem .PNG problem .PNG problem .PNG problem .PNG problem
.PNG problem .PNG problem
.PNG problem
Go Back  Xtreme Visual Basic Talk > > > .PNG problem


Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2007, 11:01 AM
rossatron rossatron is offline
Centurion
 
Join Date: Sep 2003
Posts: 126
Default .PNG problem


I have just tried to place a .png file as my forms background image and all appeared fine until i attempted to test the program. THe image simply doesnt show

i though it may have something to do with the fact that i hadnt imported it into the resource file so i did this and the image now shows but it is behind the background color of the form

have tried with other formats (.jpg , .bmp) and there isnt a problem with these.

any advice?
thanks
Reply With Quote
  #2  
Old 06-28-2007, 12:25 PM
boops boops's Avatar
boops boops boops boops is offline
Centurion
 
Join Date: Dec 2006
Location: Holland and France
Posts: 146
Default

I use PNG files all the time and they never give any trouble (in VS2005e). I wonder if your PNG has its alpha channel set to 0? Then it would be invisible. Can't think of anything else. BB
Reply With Quote
  #3  
Old 06-28-2007, 12:36 PM
rossatron rossatron is offline
Centurion
 
Join Date: Sep 2003
Posts: 126
Default

Yeah i used to use them all of the time but for some reason they have started to act up. Id have to say that it carnt be 'invisible' as when its in the resources it can be seen just behind the background color.

Tis rather annoying. Spent all afternoon creating it and now this.

Just incase it is something to do with the Alpha Channel how would i go about checking ?
Reply With Quote
  #4  
Old 06-28-2007, 12:38 PM
rossatron rossatron is offline
Centurion
 
Join Date: Sep 2003
Posts: 126
Default

Well i seem to have solved the problem. When saving from Photoshop i had the image set to 16 bits\Channel. Have changed this to 8 bits\Channel.

I know its a lil off topic but what is the difference?
Reply With Quote
  #5  
Old 06-28-2007, 12:51 PM
boops boops's Avatar
boops boops boops boops is offline
Centurion
 
Join Date: Dec 2006
Location: Holland and France
Posts: 146
Default

Assuming you've converted the image to a bitmap, you could use bmpFromPNGFile.MakeTransparent(Color.White) for example. Then only the white pixels would have alpha=0 and the rest of the image would show up. I admit it's a bit unlikely. BB
Reply With Quote
  #6  
Old 06-28-2007, 12:56 PM
boops boops's Avatar
boops boops boops boops is offline
Centurion
 
Join Date: Dec 2006
Location: Holland and France
Posts: 146
Default

Our replies crossed in the post! If you converted the file from 64bpp to 24bpp you'd get rid of the alpha channel altogether. Could it be that? Or perhaps VB.Net simply doesn't like 16-bits per channel (see other thread). BB
Reply With Quote
  #7  
Old 06-28-2007, 01:39 PM
rossatron rossatron is offline
Centurion
 
Join Date: Sep 2003
Posts: 126
Default

Im not sure, but in any case I have the image loaded and i'll be staying clear of 16bits\Channel images from now on .

Sticking with the .png theme (didnt really want to create a New Thread so soon) i was wondering is it possible to have a transparent image as the form background that isnt effected by the colour of the form itself? but is effected by whatever is behind the form? be it the wallpaper or another application etc.

im guessing this will have to be done in GDI+ , if thats the case does anybody have any links relating to this?
thanks
Reply With Quote
  #8  
Old 06-28-2007, 04:45 PM
boops boops's Avatar
boops boops boops boops is offline
Centurion
 
Join Date: Dec 2006
Location: Holland and France
Posts: 146
Default

It's possible, but it's nothing to do specifically with PNG. So perhaps it's better to start a new thread. BB
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
.PNG problem
.PNG problem
.PNG problem .PNG problem
.PNG problem
.PNG problem
.PNG problem .PNG problem .PNG problem .PNG problem .PNG problem .PNG problem .PNG problem
.PNG problem
.PNG problem
 
.PNG problem
.PNG problem
 
-->