Answer color

Mark Schonewille m.schonewille at economy-x-talk.com
Thu Mar 27 18:53:01 EDT 2008


Hi,

I fiddled a bit with gamme and png's. To import PNG's and make them  
gamma-independent, I made this script:

on crushGamma
   set the screengamma to 2.2 -- PNG gamma
   set the text of the selectedObject to the text of the  
selectedObject -- redraw
   set the screenGamma to 1.7 -- Rev's default gamma
   set the paintcompression to RLE
   export the selectedObject to myVar as PNG -- get png
   create image
   set the text of the last image to myVar -- set RLE?
end crushGamma

The script changes the screen gamma, forces the PNG image to redraw  
using the correct gamma, and exports the new image data to another  
image object, using gamma-independent RLE (or maybe using the PNG with  
the new gamme value?). Perhaps I should export as GIF instead of PNG.

I hardly know what I'm doing here, but it works. Yet, this doesn't  
really solve the problem of the answer color dialog showing  
112,112,112 in the dialog and returning 93,93,93 in the it variable. I  
have reported this as bug 6248 <http://quality.runrev.com/qacenter/show_bug.cgi?id=6248 
 >.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

A large collection of scripts for HyperCard, Revolution, SuperCard and  
other programming languages can be found at http://runrev.info






More information about the Use-livecode mailing list