Hello again.

Well, I've made some progress! I can now stick an image on a card and use that image to make an alpha channel for a second image. Hurrah. Trouble is it is S--L--O--W! It takes over 10 seconds to process a tiny 50-pixel square image!!! The utility I'm making needs to export about 3000 - much larger - graphics!

The problem is that ImageData uses 4 bytes per pixel (even if it is a 8-bit greyscale image) but AlphaData only uses 1 byte per pixel, so I have to strip the data out in a repeat loop that is huge; even for moderately sized graphics! I started with a 300 x 300 graphic, but of course for AlphaData that is 300x300 bytes = 90,000 repeats. Yuk! There must be a better way

Is there any lightning fast way of manipulating the binary data without resorting to a repeat loop?

Help!

Chris




On 4 Jul 2006, at 12:54, Chris Carroll-Davis wrote:

Hello again folks.

I recently posted a question about Rev's weird behaviour when exporting transparent PNGs from fields with Japanese text. No-one (understandably) was able to offer any help so, as is often the case, I think I'll be looking for a workaround...

... Exporting non-transparent PNGs works fine so, in theory, should I not be able to export the image (perhaps to clipboard or variable) then apply this to a graphic as an alpha channel? Then export the resulting image as transparent PNG?

So... two questions:
  1)  Does the above workaround solution sound feasible?
  2)  How the devil do I do it???!!

I've had a few half-hearted attempts at using the alphadata property, but I can't get it to work at all! Can anyone point me to some example stacks that use this property that I can dissect?

I'd be grateful for any suggestions!!


Chris


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to