Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transparent images in RIVA?
#1
Hi Dean,

There are some images for which I set a transparent color when I import them into CQC. It seems like that transparency information is not stored in the image itself, but in some kind of metadata in the image repository.

Those images are not displaying correctly in the iOS or Android RIVA clients. Is that meta information transmitted by the RIVA server?

Thanks!
Reply
#2
In principle, the RIVA protocol does handle transparency. So either it's not sent properly by the server, our clients are not processing it correctly, or the transparency of your images isn't quite standard...

Are you seeing the proper transparency in the IV and the Windows RIVA client?
Field Generator 0.65: Create CQC fields on the fly, from external applications.
Mobile templates 0.4: Main resolution of 320x480 with navigation side bars (384x544).
Sage Media Server 1.1.3 + Sage Player 2.7.8: Display and manipulate SageTV information or player.
TaRIVA 1.26: Android RIVA client.
Reply
#3
I have seen some issues with transparency in CQC, I think there was a thread on it waaaay back when. Images look ok in other apps, but transparency is lost on import. I think Dean said it was due to the component he was using for images, it tripped over errors in the image file that most seem to ignore.

Anyway, I usually just open them in an app like mspaint or gimp and resave them, that seems to fix it.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#4
I think there are two things.
1) Some images have transparency embedded in them (especially .png files?). CQC used to have a problem with some of those, but i think that was fixed. Now CQC/RIVA handles/displays those fine.

2) Some images don't have transparency embedded in them. There is an additional option when you import that let's you specify to CQC "make this color transparent whenever you display this image."

It's this 2nd one that I think is not being treated properly in RIVA. I haven't checked the C++ RIVA client, but Android and iPhone both display them without the specified transparency mask.
Reply
#5
Color based transparency isn't much used these days, so it might have been missed. Give it a quick try in the standard RIVA client and see what happens there. If it's still wrong, then it's probably on the RIVA server side. But it should be sending the transparency color in the call.
Dean Roddey
Software Geek Extraordinaire
Reply
#6
I don't think I have implemented color based transparency in taRIVA, as I don't think I was able to figure out how to do it...
Field Generator 0.65: Create CQC fields on the fly, from external applications.
Mobile templates 0.4: Main resolution of 320x480 with navigation side bars (384x544).
Sage Media Server 1.1.3 + Sage Player 2.7.8: Display and manipulate SageTV information or player.
TaRIVA 1.26: Android RIVA client.
Reply
#7
It's pretty standard sprite type transparency. It at least traditionally was heavily used in games, but I guess perhaps alpha based images may have completely taken that over these days. But I'd think that most any graphical OS would provide the means to do them still since they are pretty basic graphics type operations.
Dean Roddey
Software Geek Extraordinaire
Reply
#8
Looking at the code, I can see that for MASKED_ALPHA_BLIT, taRIVA is simply reusing the ALPHA_BLIT code... I actually ignore the c1Flags, and use a paint.setAlpha(c1ConstAlpha). For DrawBitmap, I also ignore c1BmpMode.

So I assume that's why it's not working in taRIVA, or would that be elsewhere? After a quick re-read of the Remote Viewer Guide, I still can't figure out what I'm supposed to do to handle that color based transparency... Wink
Field Generator 0.65: Create CQC fields on the fly, from external applications.
Mobile templates 0.4: Main resolution of 320x480 with navigation side bars (384x544).
Sage Media Server 1.1.3 + Sage Player 2.7.8: Display and manipulate SageTV information or player.
TaRIVA 1.26: Android RIVA client.
Reply
#9
On the iPhone, the system library automatically handles color transparency for me. When the template sends me a file, I just tell the system it's an image, and it seems to figure out the alpha channel, transparent color, or whatever it's using.

The problem is that, for one of the images the template sends me, there actually isn't a transparent color. When I look at what I am sent in my favorite graphics utility, no color is defined as transparent. So of course the iPhone app doesn't draw it with transparency.

Commander Vimes tells me that there is some setting in the interface editor that tells it to define a transparent color for a graphic you have added. But unless the CQC software then takes that transparent color and uses it to generate a modified version of the image, that setting is not going to reach any RIVA clients, because there is nothing in the protocol that indicates a special added transparent color to use in image drawing (I'm not talking about the bit defined for use by clients that don't understand alpha; that's a separate thing that I don't need, because I am able to understand alpha).
Reply
#10
I'll have to look at it tomorrow or later today. Maybe I'm not sending something I should. PNGs can have a transparency color in them, but you should actually be getting a separate one from CQC itself, which is stored outside of the image. The one in the image is a default one if no other is available and you need to display it on a display not capable of alpha transparency. It's not the one you selected when you set a transparency color during import (probably on a JPEG that was imported and then converted to PNG without an alpha channel.)
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Html 5 Riva potts.mike 9 5,282 09-15-2013, 04:22 AM
Last Post: bjkiller
  Thinking about the next step in RIVA Dean Roddey 6 4,701 01-22-2013, 06:15 AM
Last Post: brianmount
  Official RIVA thread Dean Roddey 382 71,331 07-25-2012, 02:58 PM
Last Post: Fonceur
  .Net RIVA Client Dean Roddey 146 41,114 02-06-2012, 06:53 PM
Last Post: Dean Roddey
  riva burkepaol4 1 6,193 12-17-2010, 11:39 AM
Last Post: Dean Roddey
  Riva screen blanker on CF.NET froop 3 5,357 08-06-2010, 10:34 PM
Last Post: froop
  RIVA Connection batwater 6 4,894 07-16-2010, 04:46 PM
Last Post: batwater
  Java based RIVA Client? batwater 10 6,769 04-03-2010, 05:35 AM
Last Post: wuench
  RIVA Client for Linux bryanb 22 9,356 07-16-2009, 09:11 PM
Last Post: bjkiller

Forum Jump:


Users browsing this thread: 1 Guest(s)