Re: imagedata and alpha byte

2018-05-09 Thread Niggemann, Bernd via use-livecode
Hi, please do not use numToChar in version 7.0 and up for image manipulation, use numToByte or byteToNum NumToChar is deprecated. It might work but is horribly slow. along the lines of Mike's example -- on mouseUp local tAlphaData, tTransparent, tHalfTransparent l

Re: imagedata and alpha byte

2018-05-09 Thread Mike Bonner via use-livecode
Already assuming that you know which pixel you wish to modify, (like if you want to modify pixel 25 in pixel row 3, that would be pixel 75.. I think..) you would need to do something like the following.. --first, put the current alphadata into a variable. put the alphadata of img "myImg" into tAl

Re: imagedata and alpha byte

2018-05-09 Thread jbv via use-livecode
On Wed, May 9, 2018 7:51 pm, Richmond Mathewson via use-livecode wrote: > The inevitable question has to be why you are doing that in such a > fiddly sort of way. > > Richmond. > It would be too long to explain, but in short some users of a client app will modify pixels of images that will then be

Re: imagedata and alpha byte

2018-05-09 Thread Richmond Mathewson via use-livecode
The inevitable question has to be why you are doing that in such a fiddly sort of way. Richmond. On 9/5/2018 8:49 pm, jbv via use-livecode wrote: Hi list, Still struggling with imagedata, I am trying to modify the transparency of an image by manipulating pixel by pixel the alpha byte. I tried

Re: ImageData restore problems

2014-09-22 Thread FlexibleLearning.com
Having wrestled with this for a long time, I post a solution for future reference... Situation I have a large embedded image. I want to thumbnail it/rotate it/mess with it, but be able to restore the original without loss of any original data. How do we do this? Solution We need to save the ori

Re: ImageData restore problems

2014-09-21 Thread J. Landman Gay
On 9/20/2014, 2:02 PM, FlexibleLearning.com wrote: I have an embedded image, size 120Kb, and want to toggle between a non-compacted (120Kb) and a compacted (30Kb) thumbnail version... 1. I thumbnail the original image (data is still 120Kb as expected). 2. I store the TEXT of the resized image. 3

Re: ImageData restore problems

2014-09-21 Thread Klaus major-k
Hi Hugh, Am 20.09.2014 um 21:02 schrieb FlexibleLearning.com : > I have an embedded image, size 120Kb, and want to toggle between a > non-compacted (120Kb) and a compacted (30Kb) thumbnail version... > > 1. I thumbnail the original image (data is still 120Kb as expected). > 2. I store the TEXT

Re: imageData

2014-07-01 Thread Peter Haworth
Thanks Monte. I had the impression from the dictionary that imageData and text were two separate properties but on reading again, I see one can be derived from the other. Pete lcSQL Software Home of lcStackBrowser and SQLiteAdmin <

Re: imageData

2014-06-30 Thread Monte Goulding
On 1 Jul 2014, at 2:31 pm, stephen barncard wrote: > On Mon, Jun 30, 2014 at 5:15 PM, Peter Haworth wrote: > >> Wondering if there's a good reason why the imageData property of an image >> is not included in its properties? >> > > perhaps because the missing properties' data are either huge

Re: imageData

2014-06-30 Thread stephen barncard
On Mon, Jun 30, 2014 at 5:15 PM, Peter Haworth wrote: > Wondering if there's a good reason why the imageData property of an image > is not included in its properties? > perhaps because the missing properties' data are either huge or multi-dimensional *--* *Stephen Barncard - San Francisco Ca. U

Re: imageData and 6.1.1 and bug ?

2013-09-30 Thread Neil Roger
Thanks Colin. I'll add an internal comment to report with this information. Kind Regards, Neil Roger -- RunRev Support Team ~ http://www.runrev.com -- On 30/09/2013 12:26, Colin Holgate wrote: Neil, note that the example PNG is 8 bit. That may be a factor. On Sep 30, 2013, at 4:40 AM, Ludovi

Re: imageData and 6.1.1 and bug ?

2013-09-30 Thread Colin Holgate
Neil, note that the example PNG is 8 bit. That may be a factor. On Sep 30, 2013, at 4:40 AM, Ludovic Thébault wrote: > Done yesterday : > http://quality.runrev.com/show_bug.cgi?id=11238 ___ use-livecode mailing list use-livecode@lists.runrev.com Ple

Re: imageData and 6.1.1 and bug ?

2013-09-30 Thread Ludovic Thébault
Le 30 sept. 2013 à 10:38, Neil Roger a écrit : > Hi Ludovic, > > The results do look a bit strange via 6.1.1. > > Could you please file a report on this issue with RunRev Quality Control and > we will happily investigate it further. > > Kind Regards, > > Neil Roger Hello, Done yesterday

Re: imageData and 6.1.1 and bug ?

2013-09-30 Thread Neil Roger
Hi Ludovic, The results do look a bit strange via 6.1.1. Could you please file a report on this issue with RunRev Quality Control and we will happily investigate it further. Kind Regards, Neil Roger -- RunRev Support Team ~ http://www.runrev.com -- On 28/09/2013 19:42, Ludovic Thébault wrot

Re: imageData and 6.1.1 and bug ?

2013-09-28 Thread Ludovic Thébault
Le 28 sept. 2013 à 23:47, Alejandro Tejada a écrit : > Hi Ludovic, > > Looks like the alphadata values are inverted... > So, 255 is transparent and 0 (zero) is opaque. > > I do not understand why. > Yes something wrong. here a test stack : go stack URL("http://ludovic.thebault.free.fr/dow

Re: imageData and 6.1.1 and bug ?

2013-09-28 Thread Alejandro Tejada
Hi Ludovic, Ludovic Thébault wrote > [snip] > the same imageData returned with LiveCode 6.1.1 is : > ˇøˇˇˇ???ˇ™ˇˇˇ™ˇˇˇ > ### with the chartonum function : > 255 191 255 255 255 0 0 0 255 170 255 255 255 170 255 255 255 > so my script doesn't work… some null char aren't null anymore ? > a transpar

Re: imageData again

2013-06-21 Thread Thomas McGrath III
I will give that a try. Thank Mike, Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com On Jun 21, 2013, at 5:36 PM, Mike Bonner wrote: > Silly question, but if you create your image, set its size and lock it then > use "the text of.." instead of the imagedata, seems like it wo

Re: imageData again

2013-06-21 Thread Mike Bonner
Silly question, but if you create your image, set its size and lock it then use "the text of.." instead of the imagedata, seems like it would avoid the possibility of munging the imagedata (though it seems like it should work if the sizes are identical). Using the text of the image should avoid th

Re: imageData and resizing

2013-06-14 Thread Mark Schonewille
Hi Tom, This won't work, unless the imageData fit the image rect exactly. To solve this, set the imageData first and then resize. Better yet: don't use imageData but use the original PNG or JPEG data to set the text of the image object. Set the lockLoc to false, then set the text, resize, and

Re: imageData and resizing

2013-06-14 Thread J. Landman Gay
On 6/14/13 8:19 AM, Thomas McGrath III wrote: I'm trying to find a solution to images getting messed up after doubling their size for retina and then trying to set the imageData after they have been resized. The images get messed up with either horizontal lines or color shifts. This works for

Re: imageData and resizing

2013-06-14 Thread Paul Hibbert
Thomas, In your script we can't see where "tempimage" comes from or what it contains, so to get this to work I had to change the last line to… set the imageData of image x to the imageData of image x Then it appears to work OK, for me at least. Paul On 2013-06-14, at 6:19 AM, Thomas McGrath I