Page 7 of 8
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:18 am
by [-hh]
Hi, just follow the arrows.
There is only one button (orange), script has at about 30 lines, for compressing PNG -> JPNG.
And there is only one button (green), script has also at about 30 lines, for decompressing JPNG -> PNG.
In order to keep it simple the file-versions have their own buttons, the file system dialogs need some more lines. But the method is identical.
The fileformat structure is simply a header for width, height, useAlphaData, then the alphadata (or maskdata), then the JPEG-compressed imageData. Backwards convert the JPEG-data to PNG and set the alphaData/maskData. Of course we use additionally compress/decompress.
That's all. No advanced things in there. (One has to be careful when using the different parts of the data.)
The js- and objC-people have a "JPNG"-format that uses not a header but a footer. So a conversion between the two formats is easily possible.
Re: Images in Livecode
Posted: Fri Aug 11, 2017 10:18 am
by bidgeeman
Hi again

I have been searching the forum for a quick way of processing an image so that it's color
slightly changes. It's a transparent .png overlay of guidelines for measurements that sits over
the main image area. The lines are a very light blue color but I just realized that if a design is
loaded that is blue the lines on the grid will disappear into the design. I tried to convert it to
greyscalewith a greyscale script I found in one of Klaus's old threads but the image processing
takes a lot of time to process evey pixel. Can anyone suggest a quicker way out of this?
Thanks again
Bidge
Re: Images in Livecode
Posted: Fri Aug 11, 2017 1:40 pm
by [-hh]
Why don't you look at "Sample stacks" (sort by date downwards) of the LC toolbar:
'
LCImageToolBox' or here:
http://livecodeshare.runrev.com/stack/826/ for use with LC 8/9 on Mac/Win/linux
http://livecodeshare.runrev.com/stack/827/ for use with LC 6/7/8/9 on Mac
??
Re: Images in Livecode
Posted: Fri Aug 11, 2017 1:49 pm
by bidgeeman
Oh thanks [hh]....I had not seen that stack before in the samples?
It looks like an answer is there somewhere
Bidge
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:31 pm
by richmond62
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:40 pm
by bidgeeman
richmond62.
Thanks you so much. Maybe this is the reason I am having so much trouble with learning LC. I search and search for solutions and get multiple answers which I experiment with and then I post a thread and find out there is a much easier way to do things? It does make things difficult from a complete beginners point of view. Thanks to this forum though otherwise I would be doing things the long way
Thank you all again.
Bidge
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:44 pm
by richmond62
It's not that simple: I just made a fool of myself in front of Klaus Nomi (whoops, Mayer) and Mark Waddingham
over on the Use-List.

- Wrong Klaus
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:50 pm
by [-hh]
Richmond,
it is so good to see that you dont have any problem.
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:53 pm
by richmond62
? Problem ?
Some people take themselves and their failings far, far too seriously.
Life is to be enjoyed & Klaus and I have a good thing going that has been going on for years

Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:54 pm
by bidgeeman
I took a brief look and it seemed to process the bitmap effect a lot faster than I have experienced. I'll take another look in the morning.
Don't worry...I always make a fool of myself

It makes you more human
Bidge
Re: Images in Livecode
Posted: Fri Aug 11, 2017 2:56 pm
by Klaus
richmond62 wrote:It's not that simple: I just made a fool of myself in front of Klaus Nomi (whoops, Mayer)...
And again! Come on, my name is even a valid english word...

Re: Images in Livecode
Posted: Fri Aug 11, 2017 3:04 pm
by richmond62
Messing around with the RGB levels of an image can produce great effects.
Re: Images in Livecode
Posted: Fri Aug 11, 2017 3:06 pm
by richmond62
And again!
Rishmond is very shorry, and begsh forgiveness.
Mind you:
Klaus Nomi WAS a fantastic musician.
Re: Images in Livecode
Posted: Fri Aug 11, 2017 3:14 pm
by Klaus
richmond62 wrote:And again!
Rishmond is very shorry, and begsh forgiveness.
Thou shalt be forgiven!
richmond62 wrote:Mind you: Klaus Nomi[/b] WAS a fantastic musician.
Sure he was, but that's really not my cup of tea!
Re: Images in Livecode
Posted: Fri Aug 11, 2017 5:04 pm
by richmond62