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.
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 :) )
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
are you using an alphablended png or a png with its own transparency ?
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?
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.
I tried gif and bmp, neither works. It must be something with my setup, because it works for others, doesn't it?
post your image files and I will take a look and see if I can spot something.
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.
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
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.
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.
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
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.
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
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
Something is off in the command, since I went out side and it is a half moon now. What do I change?
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
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.
Quote from: joelw135Ok works now.
Fine, so I'm going to bed now....
Greetings Broesel
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.
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.