linux - C# Graphics.DrawImage() transparent png background -


i'm developing image editor application using c# of system.drawing.graphics class. app must able operate on windows , linux well.

the scenario simple, have background image (jpeg, 24bpp, not progressive), , have draw transparent png images onto it. i'm using following pattern (with other coordinates , more images):

bitmap backgroundjpg = new bitmap("bg.jpg"); bitmap transparentpng = new bitmap("transp.png");  using (var g = graphics.fromimage(backgroundjpg)) {     g.drawimage(transparentpng, new point(0, 0)); }  backgroundjpg.save("test.jpg"); 

on windows, result of process ok.
on linux, looks png images not being handled correctly, looks not "transparent well" when being drawn graphics instance. (edit: i've checked, transparent, not way on windows.)

edit: i'm interested in alternative solutions well, if runs both on windows , linux.

edit 2: looks the transparency bad if transparent image has background behind it. if being drawn on blank format32bppargb image, ok.


additional information:

maybe i'm missing configuration options force transparent during drawing process, or there configured on linux itself.

linux configuration: (if helps)
beaglebone black device with
- debian gnu/linux 7.9 (wheezy).
- mono:
    - jit compiler: 4.0.5
    - architecture: armel, vfp+hard
    - gc: sgen

any appreciated, , feel free ask if other details needed. thanks!

note: on following images, red "x" part of black background, , blue images transparent pngs.

windows 8.1 result:
windows 8.1 result

linux debian result:
linux debian result


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -