Images in Livecode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Images in Livecode
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.
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.
shiftLock happens
Re: Images in Livecode
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
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
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Images in Livecode
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
??
'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
??
shiftLock happens
Re: Images in Livecode
Oh thanks [hh]....I had not seen that stack before in the samples?
It looks like an answer is there somewhere
Bidge
It looks like an answer is there somewhere
Bidge
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Images in Livecode
Last edited by richmond62 on Fri Aug 11, 2017 3:05 pm, edited 1 time in total.
Re: Images in Livecode
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
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
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Images in Livecode
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.
over on the Use-List.
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Images in Livecode
Richmond,
it is so good to see that you dont have any problem.
it is so good to see that you dont have any problem.
Last edited by [-hh] on Fri Aug 11, 2017 3:08 pm, edited 2 times in total.
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Images in Livecode
? 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
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
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
Don't worry...I always make a fool of myself It makes you more human
Bidge
Re: Images in Livecode
And again! Come on, my name is even a valid english word...richmond62 wrote:It's not that simple: I just made a fool of myself in front of Klaus Nomi (whoops, Mayer)...
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Images in Livecode
Messing around with the RGB levels of an image can produce great effects.
Last edited by richmond62 on Fri Aug 11, 2017 5:03 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Images in Livecode
And again!
Rishmond is very shorry, and begsh forgiveness.
Mind you: Klaus Nomi WAS a fantastic musician.
Last edited by richmond62 on Fri Aug 11, 2017 3:15 pm, edited 1 time in total.
Re: Images in Livecode
Thou shalt be forgiven!richmond62 wrote:And again!
Rishmond is very shorry, and begsh forgiveness.
richmond62 wrote:Mind you: Klaus Nomi[/b] WAS a fantastic musician.
Sure he was, but that's really not my cup of tea!
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Images in Livecode
Last edited by richmond62 on Fri Aug 11, 2017 6:56 pm, edited 1 time in total.