Click here to Skip to main content
15,914,335 members
Home / Discussions / C#
   

C#

 
QuestionWinforms gui and C# Pin
copec25-Jul-09 18:39
copec25-Jul-09 18:39 
AnswerRe: Winforms gui and C# Pin
Md. Marufuzzaman25-Jul-09 18:55
professionalMd. Marufuzzaman25-Jul-09 18:55 
AnswerRe: Winforms gui and C# Pin
PIEBALDconsult25-Jul-09 19:37
mvePIEBALDconsult25-Jul-09 19:37 
QuestionVscroll Pin
SajjadZare25-Jul-09 16:37
SajjadZare25-Jul-09 16:37 
QuestionQuery deployed Applications via GPO Pin
User 223019725-Jul-09 14:22
User 223019725-Jul-09 14:22 
Questionpng to jpg Pin
nryk25-Jul-09 11:03
nryk25-Jul-09 11:03 
AnswerRe: png to jpg Pin
Christian Graus25-Jul-09 12:53
protectorChristian Graus25-Jul-09 12:53 
AnswerRe: png to jpg Pin
BillWoodruff25-Jul-09 15:19
professionalBillWoodruff25-Jul-09 15:19 
Hi Nryk,

This response assumes you are not using WPF.

Well, if you want to do this outside your own code, any tool like ACDSee will convert your .png with transparency to a .jpg which looks okay : I have not experimented with this to any depth, but the default settings of ACDSee's .jpg conversion will produce a file with the transparent areas rendered in white.

I would guess it is possible in PhotoShop (I use CS4) to change the settings when you save as .png (while PhotoShop only shows a 24bpp option .png, in fact it does save the alpha) so that what color shows up in the .jpg (where the transparency was) trasformed by ACDSee varies, but that's a guess.

I have never tried making a .png in PhotoShop with partial transparency (unless this is a side-effect of "feathering," which I use often, that I am not aware of). But now that you mentioned it, I am curious to experiment.

If you are doing conversion at run-time in your own code, I would guess you are going to have to construct a new bitmap and interpolate the alpha values into tints of color (luminance values ?) in the rgb source. But I would certainly go and research this with Google, and on StackOverFlow, and, of course, right here on CP.

I would also advise you to check out Bob Powell's win forms and graphics for .NET sites (somewhat out of date, but still full of great hints and tips if you are using WinForms) :

Tips/Tricks[^]

GDI+ FAQ[^]

Check out the CP AlphaForm article[^], by Jeff Anderson, and his source code, for great information on transparency via Layered Windows. While it is not specificly targeted at .png, I think you'll find it valuable.

You can check out my raving about Jeff's article[^]; in that message I include a link to a very valuable on-line resource for understanding .png optimization.

best, Bill

"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844

AnswerRe: png to jpg Pin
Joe Woodbury25-Jul-09 16:34
professionalJoe Woodbury25-Jul-09 16:34 
QuestionDeletion via gridview. Pin
Omar Akhtar Sheikh25-Jul-09 9:56
Omar Akhtar Sheikh25-Jul-09 9:56 
AnswerRe: Deletion via gridview. Pin
Abhijit Jana25-Jul-09 10:05
professionalAbhijit Jana25-Jul-09 10:05 
AnswerRe: Deletion via gridview. Pin
SajjadZare25-Jul-09 16:57
SajjadZare25-Jul-09 16:57 
QuestionWPF / C# Listview Selected Item Pin
Jacob Dixon25-Jul-09 9:33
Jacob Dixon25-Jul-09 9:33 
AnswerRe: WPF / C# Listview Selected Item Pin
Abhijit Jana25-Jul-09 9:40
professionalAbhijit Jana25-Jul-09 9:40 
GeneralRe: WPF / C# Listview Selected Item Pin
Jacob Dixon25-Jul-09 17:06
Jacob Dixon25-Jul-09 17:06 
Question[Message Deleted] Pin
Omar Akhtar Sheikh25-Jul-09 9:31
Omar Akhtar Sheikh25-Jul-09 9:31 
AnswerCP Member : Please Ignore - Crosspost Pin
Abhijit Jana25-Jul-09 9:45
professionalAbhijit Jana25-Jul-09 9:45 
Questionhow to disable keyboard.......... [modified] Pin
Member 423560125-Jul-09 8:24
Member 423560125-Jul-09 8:24 
AnswerRe: how to disable keyboard.......... Pin
Abhijit Jana25-Jul-09 8:48
professionalAbhijit Jana25-Jul-09 8:48 
AnswerRe: how to disable keyboard.......... Pin
PIEBALDconsult25-Jul-09 8:50
mvePIEBALDconsult25-Jul-09 8:50 
Questionmark as unsaved if the user changes ANYTHING? Pin
Megidolaon25-Jul-09 7:58
Megidolaon25-Jul-09 7:58 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Mike Ellison25-Jul-09 8:48
Mike Ellison25-Jul-09 8:48 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
PIEBALDconsult25-Jul-09 10:49
mvePIEBALDconsult25-Jul-09 10:49 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
DaveyM6925-Jul-09 11:29
professionalDaveyM6925-Jul-09 11:29 
AnswerRe: mark as unsaved if the user changes ANYTHING? Pin
Mike Ellison25-Jul-09 17:39
Mike Ellison25-Jul-09 17:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.