Hijack: defining PNG color register values

Posted by: hybrid8

Hijack: defining PNG color register values - 02/02/2002 14:56

This is a request to allow the definition of four (4) three-byte values for the colours used by Hijack when creating the PNG image of the player output.

This would allow Bitt's VNC app as well as Greg's HTML controller to show your player's actual colour screen.

I suppose Mark could always plug the colour values right into Hijack, but then I'm sure everyone would ask for at least the base faceplate covers. And then the custom requests would come in. This way it's possible to custom-tailor the output colour to your specific requirements.

Just an idea.

Bruno
Posted by: mlord

Re: Hijack: defining PNG color register values - 02/02/2002 16:53

I'm not sure where you want the colours.. in Hijack, or EmpVNC??

The .png format I am using is packed greyscale, no provision for colours other than grey. To make a colour .png file would require less efficient packing == larger file sizes.

??
Posted by: hybrid8

Re: Hijack: defining PNG color register values - 02/02/2002 17:04

I thought you were using something like a low (2,3,4) bit PNG with a cmap. If there's no cmap then the suggestion is rather pointless.

Would you be able to write the less efficiently packed file faster than the one you're writing now? Would the browser display it faster than the one you have now? I don't know if you've compared the sizes/times. My player is sitting around doing a disk check right now so I can't go look at the file myself (you didn't break the disk check pref in the latest hijack did you?) Emplode has been going for what seems like an eternity (completed one whole progress bar and now it's going again...)

Bruno
Posted by: mlord

Re: Hijack: defining PNG color register values - 02/02/2002 21:44

>I thought you were using something like a low (2,3,4) bit
>PNG with a cmap.

No it's a 2-bit greyscale mapping, 4 bits per byte. This is the most efficient overall to use, too, since no bits are wasted.

Other formats would increase the filesize by at least 2X or 4X, and really save any CPU, since most PNG overhead is directly proportional to the file size (bytewise checksum, and CRC32, and ..).

Good thought, though.

There's also a RAW (twice the size) screen file in /proc, which is very low overhead, for app's that want it.

-ml

Posted by: wfaulk

Re: Hijack: defining PNG color register values - 03/02/2002 10:08

I'm just using Hijack's /proc/empeg_display.raw (or whatever it is -- I'm not in front of my code right now), which is just a duplication of the empeg's internal (oddly packed) 2-bit bitmap. In addition, it would be nigh impossible to convert those colors to something useful in RFB's (oddly packed) 8-bit index. However, I do have plans to add color support to empegVNC. I don't know how closely it will match the actual display, but it'll get you closer.
Posted by: hybrid8

Re: Hijack: defining PNG color register values - 03/02/2002 10:19

4-colour PNG increases the "file" size by approximately 50% I did the saving in PhotoShop so I don't know how it's storing the file...

Bruno