TodayPlus Boards v2

TodayPlus for the Pocket PC Forums => Help and Support => Topic started by: MadTxn on December 29, 2003, 11:50:18 AM

Title: imagemeter transparency
Post by: MadTxn on December 29, 2003, 11:50:18 AM
I'm trying to use the imagemeter command to show moon phases, and I'm having a transparency issue.

this command:

image,0,0,moon_phases.png,t


shows the image with a transparent background, while the below command does not.  


imagemeter,0,0,%var18%,moon_phases.png,t,0,200


Any ideas?  BTW, the replacement part of it works fine.
Title: imagemeter transparency
Post by: fishboy on December 29, 2003, 12:45:41 PM
This might be a bug with this command, but adding the replacement color option "r" to the <image options> parameter seems to make it work.
imagemeter,0,0,%var18%,moon_phases.png,tr,0,200

Also make sure you are specifying the transparency color to use, such as "color,transparent,255_0_255" before the imagemeter command (you may be already doing this, but it can never hurt to state the obvious  :) )
Title: imagemeter transparency
Post by: MadTxn on December 29, 2003, 01:29:35 PM
I am.  I have the two commands in the exact same spot, just one or the other commented out.  The plain "image" command works, but the "imagemeter" one doesn't.  

I don't know if it makes a difference, but my transparent color is green (0_255_0) because of the PI icons, but pink doesn't work either.

Here's a screenshot with the below commands:

image,0,0,moon_phases.png,t
imagemeter,0,26,%var18%,moon_phases.png,t,0,200
Title: imagemeter transparency
Post by: srs on December 29, 2003, 01:53:12 PM
are you using an alphablended png or a png with its own transparency ?
Title: imagemeter transparency
Post by: MadTxn on December 29, 2003, 01:59:33 PM
That's a good question.  I have no idea...  I just downloaded the image from here (http://www.dark-mojo.com/todayplus/viewtopic.php?p=5724#5724).  I'm assuming it makes a difference?
Title: imagemeter transparency
Post by: srs on December 29, 2003, 02:04:00 PM
try converting it to a bmp or gif and see if it works.  alphablended and natively transparent pngs will not work with the imagemeter command.
Title: imagemeter transparency
Post by: MadTxn on December 29, 2003, 02:14:10 PM
I tried gif and bmp, neither works.  It must be something with my setup, because it works for others, doesn't it?
Title: imagemeter transparency
Post by: srs on December 29, 2003, 02:19:58 PM
post your image files and I will take a look and see if I can spot something.
Title: imagemeter transparency
Post by: MadTxn on December 29, 2003, 02:32:16 PM
Attached are the various images I've used, and here are the relevant lines of code.


color,transparent,0_255_0
color,replacement,6,0_0_0
color,shadow,125_125_125

...

calcvar,var18,moonphase,%var6%
image,0,0,moon_phases.png,t
imagemeter,0,26,%var18%,moon_phases.png,t,0,7


I'll also try to make a new image when I get home.  I don't have PShop here at work.  Thanks for the help.
Title: imagemeter transparency
Post by: Timmy on December 29, 2003, 03:08:44 PM
Quote from: MadTxnAttached are the various images I've used, and here are the relevant lines of code.
color,transparent,0_255_0
color,replacement,6,0_0_0
color,shadow,125_125_125
...
calcvar,var18,moonphase,%var6%
image,0,0,moon_phases.png,t
imagemeter,0,26,%var18%,moon_phases.png,t,0,7
.

I don't know, but maybe it will help you a bit. On this tread I've found some good moonphase-stuff in the Recombinant skin with moon.zip :

http://www.dark-mojo.com/todayplus/viewtopic.php?p=5826&sid=9d6b63068aac56d95b330b1b43414240#5826
Title: imagemeter transparency
Post by: MadTxn on December 29, 2003, 03:35:48 PM
Quote from: fishboyThis might be a bug with this command, but adding the replacement color option "r" to the <image options> parameter seems to make it work.
imagemeter,0,0,%var18%,moon_phases.png,tr,0,200

For some reason, I JUST saw this.  True, that does work, until you change the pink to green, as I've had to do.  Here's what I get. (note, I moved the non-working imagemeter to the same row as the working image)

You can see that the black changed to pink, and the background is still non-transparent.  I will create a new image later tonight, and I _believe_ that will fix it.
Title: imagemeter transparency
Post by: joelw135 on December 29, 2003, 06:10:19 PM
How would I convert the moon phases png to 15 X 15 for each image. I have it set up to match the Sunrise Sunset images in my skin.
Title: imagemeter transparency
Post by: Broesel on December 29, 2003, 06:17:17 PM
Quote from: joelw135How would I convert the moon phases png to 15 X 15 for each image. I have it set up to match the Sunrise Sunset images in my skin.

Hi Joel,

The moon phases.png is 25 x 200 px.

If you want to use it with the imagemeter-command your phases-pic
has to be 15 x 120 px.

That should work for you.

Greetings Broesel
Title: imagemeter transparency
Post by: joelw135 on December 29, 2003, 06:20:21 PM
Thanks, but whitch one do I download since one showed up on my Axim with a green background?

Never mind, I had to save it as a bmp.
Title: imagemeter transparency
Post by: Broesel on December 29, 2003, 06:33:20 PM
Quote from: joelw135Thanks, but whitch one do I download since one showed up on my Axim with a green background?

Hmm,  give this one a try:

Greetings Broesel
Title: imagemeter transparency
Post by: joelw135 on December 29, 2003, 06:43:45 PM
I changed the imagemeter command for my size png. does this look correct? I changed the 25 to 15 on the second line and I changed the 200 on the last line to 120. The only thing that bothers me is that the original code had a half moon for today and it is a cresent moon now. I don't know which is correct.

calcvar,var30,moonphase,1
calcvar,var30,*,%var30%,15
imagemeter,93,45,%var30%,phases.png,t,0,120
Title: imagemeter transparency
Post by: joelw135 on December 29, 2003, 06:47:25 PM
Something is off in the command, since I went out side and it is a half moon now.  What do I change?
Title: imagemeter transparency
Post by: Broesel on December 29, 2003, 06:56:24 PM
No, that code was not correct (it has been corrected in the original thread now)

the commands should be:

calcvar,var30,moonphase,1
imagemeter,93,45,%var30%,phases.png,t,0,7

and with the smaller png I posted:

imagemeter,93,45,%var30%,phases15x15.png,t,0,7

Greetings Broesel
Title: imagemeter transparency
Post by: joelw135 on December 29, 2003, 07:03:14 PM
Ok works now. I had a combination of two commands.  I should have my eyes looked at.  It was directly in front of me and I didn't see it.
Title: imagemeter transparency
Post by: Broesel on December 29, 2003, 07:10:30 PM
Quote from: joelw135Ok works now.

Fine, so I'm going to bed now....

Greetings Broesel
Title: imagemeter transparency
Post by: MadTxn on December 30, 2003, 12:16:52 PM
OK, I've narrowed the problem down to the background.  If I use a pink background on the image and specify the transparent color, the transparency works.  If I use a green background and specify the color, it doesn't work.
Title: imagemeter transparency
Post by: srs on December 30, 2003, 12:39:55 PM
yep, I get the same problem too.

I'll have to take a look at the code to see if I can find the bug.