Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

PNG Alpha transparent vs Sprites

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-02-2009, 03:02 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default PNG Alpha transparent vs Sprites

i'm not understand, why alpha transparent doesn't work on PPC.ON pc is all right and nice?but on PPC all transparent's pixels replaced by white.
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #2 (permalink)  
Old 10-02-2009, 03:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

PPCs don't support Alpha. Alpha is always 255 in a PPC color.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 10-02-2009, 08:40 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

emmmm...but what about GraphicsExtension? (and GDI+ ,but i'm not assured)I'm found some info about it, but only on russian *sorry*
??????? ???? Windows Mobile : ??? ??????? ??????????????? ????????? ??? ?????????? Windows Mobile, ???????????? Microsoft .NET Compact Framework
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #4 (permalink)  
Old 10-03-2009, 08:08 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I didn't know this but apparently GDI+ was introduced in Windows Mobile 5 so it is not present on 2003 and 2003 SE devices. It is also not present on any version of smartphone (including Windows Mobile 6 Standard) or basic Windows CE. It is a native mode API and is not available in the Compact Framework.

Using GDI+ on Windows Mobile - Compact Framework

I might have a go at porting my desktop GDI+ library once I have finished playing with my current Remoting ptoject.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 10-03-2009, 03:28 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

It is a good news)) how you think,Andrew, with GDI+ we can use alpha transparent in sprites?
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #6 (permalink)  
Old 10-03-2009, 04:12 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Byak@ View Post
with GDI+ we can use alpha transparent in sprites?
Very unlikely, the device GDI+ apparently only implements about 85 of the 400 functions present on the desktop. I can't, after a quick look, see support for bitmap alphablending. Even if it were available it would require a rewrite of the Sprite library so I don't think it will happen!
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #7 (permalink)  
Old 10-03-2009, 05:33 PM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

Agraham, did you see these links? They might be of interest though I guess you know them:

.Net CF UI and More : Alphablending with NETCF
AlphaBlend
Reply With Quote
  #8 (permalink)  
Old 10-03-2009, 06:24 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Ariel_Z View Post
I guess you know them
Thanks, I didn't.

The AlphaBlend API function does the same as AlphaBlend already in ImageLibEx and GDI+Desktop which is a constant blend. Theoretically the AlphaBlend API can deal with individual pixel alpha but in practice the CF bitmap loading process strips any alpha information so you can't easily get the alpha information into the managed world on the device. What Byak@ wants is to use png images with individual pixel alpha.

The COM interface article looks more interesting. Although I wouldn't attempt to interface to the COM exposure of GDI+ on the device (I hate COM and do this stuff for pleasure not pain!) the presence of pixel alpha capability in the COM Iimage does indicate that somewhere in the functions available to P/Invoke there might be a chance. I didn't see it on a very quick scan so I'll see if it's there if/when I look more closely at it - unless you want to take a stab at it first .
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #9 (permalink)  
Old 10-03-2009, 06:35 PM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

I actually did... but my conclusion is very similar - I can't see a straightforward way, and so does experts on the web (whom I read). I didn't find a lead to a pixel-base alphablend. Although I see what you mean.
The place I sometimes start looking from when I need to P/Invoke anything is pinvoke.net: the interop wiki! - especially the coredll at the bottom left. You might know the site. But I'm affraid that's all I have to contribute here...
Reply With Quote
  #10 (permalink)  
Old 10-04-2009, 01:35 AM
Knows the basics
 
Join Date: Dec 2008
Posts: 77
Awards Showcase
Beta Tester 
Total Awards: 1
Default

IImageFactory works quite well, but there seems to be a small memory leak when used with Com Interop.
And will only work from a file or a resource.

Per pixel AlphaBlend needs a 32bit DIB vs, a DDB which does not suppprt the Alpha channel.
A Bitmap loaded from a file and then AlphaBlended on a DIB works but seems to get mirrored and split in two and does retain the Alpha.
Bitmaps from a b4p imagelist don't seem to work at all.
Though I think it should work as it is an embedded resource that can retain the Alpha channel, just haven't figured it out yet.

So the answer for now anyway is IImage.
I haven't got a chance to upload my Alpha library yet but it does work.
Hopefully tomorrow I will after cleaning out the junk.
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alpha channel transparent Byak@ Questions (Windows Mobile) 15 04-23-2010 05:32 PM
Help with Sprites and Transparency Drewpeu Questions (Windows Mobile) 1 09-24-2008 06:29 PM
Manage many sprites serge Questions (Windows Mobile) 3 07-31-2008 09:29 AM
Video or Picture with Alpha over live camera? realvision Code Samples & Tips 0 04-01-2008 12:12 AM
No 8-bit alpha for transparent pngs? Mistrel Questions (Windows Mobile) 2 10-13-2007 06:39 AM


All times are GMT. The time now is 10:29 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0