You are not logged in.

rdhoore108

Trainee

  • "rdhoore108" started this thread

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

1

Saturday, October 2nd 2010, 11:41pm

hotspot transparency

I'm trying to implement a hotspot with a transparency mask. Klaus wrote that the mask image must have an alpha channel. However, I see he used grayscale jpeg images as mask in his example, and when I open darkmask.jpg in Photoshop CS5, I don't see any alpha channel. But the examples works. *confused*

However, when I save my own mask image as a grayscale jpeg, and use it in my own project, krpano does not apply the mask. *confused* So it seems to really need an alpha channel.

But Photoshop does not allow me to save the alpha channel for jpeg images. The option "Alpha channels" is grayed out. I tried saving as a TIF instead, but krpano chokes on it.

Would anyone know how to do this?
- Ronny D'Hoore

2

Saturday, October 2nd 2010, 11:58pm

Isn't he using a png?


<hotspot name="pic" url="pic.jpg" ath="0" atv="0" mask="hotspot[picmask]" />
- <!-- alphachannel mask for image, scale on click
-->
<hotspot name="picmask" url="mask.png" ath="0" atv="0" scale="0.25" destscale="0.25" onclick="switch(destscale,0.25,1.8);tween(scale,$destscale);" />

Or are you referring to something else?

I don't see a darkmask.jpg file in the example.


jarred

rdhoore108

Trainee

  • "rdhoore108" started this thread

Posts: 89

Location: Belgium

Occupation: Systems and Network Administrator

  • Send private message

3

Sunday, October 3rd 2010, 12:04am

Hmm, it seems I was looking in the wrong examples folder. I looked in "masks", but apparently I needed "masked-radar-textfield-hotspot", and there the mask is a png file. It does not have an alpha channel as known in Photoshop, but rather simple transparency.

So I figured it out: the part that needs to be transparent, should be transparent in png, and the part that should be there, should be white. So it can even be saved as png-8 with just 2 colors.

It's working nicely now *thumbup*

PS. Jarred, I just posted my own observations a few minutes after you, and didn't read your reply in time, but thanks very much. I had been looking at this for 45 min. already, totally puzzled, so decided to post my cry for help, and then of course I figured it out...
- Ronny D'Hoore