Images in Livecode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Images in Livecode

Post by bogs »

richmond62 wrote:
Elton_John_-_Don't_Shoot_Me_I'm_Only_the_Piano_Player.jpg
Come to think of things: have a shot at the guitar player :twisted:
Glad I play the banjo, too much violence in the other slots :lol:
Image
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Images in Livecode

Post by Klaus »

To quote Mark Twain:
A gentleman is a man who can play the banjo, but doesn't! :D

@ Richmond:
I play the BASS! 8)
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Images in Livecode

Post by bogs »

Sure glad I ain't no gentleman ! :P

You play a bass?
Image
Sounds fishy to me :P :P
Image
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Images in Livecode

Post by Klaus »

Yes, I play Bass! :D
Attachments
BASS_player.jpg
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Images in Livecode

Post by jacque »

After all that, is there a reason not to use the import and export commands? These are built into the engine and do everything you want in single one-line commands. They are specifically designed to work with images and will preserve all the binary information.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10431
Joined: Fri Feb 19, 2010 10:17 am

Re: Images in Livecode

Post by richmond62 »

Klaus wrote:Yes, I play Bass! :D
Well, you should be relieved I misfired. 8)
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Images in Livecode

Post by [-hh] »

jacque wrote:After all that, is there a reason not to use the import and export commands?
There is no deep logic in this thread, it is "experimental", if not "highly experimental" as soon as I'll come in playing saxes.
shiftLock happens
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10431
Joined: Fri Feb 19, 2010 10:17 am

Re: Images in Livecode

Post by richmond62 »

newFools.jpg
I just play the fool.

Watch my folly here:

https://www.dropbox.com/s/rgeiyqivudsvh ... d.m4v?dl=0
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Images in Livecode

Post by bidgeeman »

Hi Jacque.
Yes I want to be able to handle the alpha channel separately to the bitmap. This format serves two purposes as
it gives my artwork some form of protection from the normal person as well as allow me to swap alpha channels
and transfer them between designs, turn them off etc.
guess you could argue that this can be done many other ways as well but I am still learning LC and at this stage
I have a grasp on how the skin on this cat works :)

Klaus, do you actually play Bass? (not the fish the instrument :)
Bidge
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Images in Livecode

Post by bogs »

bidgeeman wrote:Klaus, do you actually play Bass? (not the fish the instrument :)
Yes, yes he does, and quite well from all reports.
Image
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10431
Joined: Fri Feb 19, 2010 10:17 am

Re: Images in Livecode

Post by richmond62 »

I am still learning LC
If it is any comfort at all, after 16 years I am still learning Livecode.

As Livecode is extremely complex and keeps getting bigger I'd be surprised if
there were anyone who, being completely honest, would say that they
know Livecode 100%.

This is great: can you imagine how boring things would be if there
were not new things to be discovered every day?
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Images in Livecode

Post by bidgeeman »

richmond62. Thanks for the encouragement. I appreciate all your help as well as all the others.
Thanks bogs: Klaus. I also play Bass and sing. For many years mainly jazz but do a lot of covers now.
Bidge
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Images in Livecode

Post by Klaus »

Hi friends,

please find out yourselfes:
http://www.major-k.de/bass/index.html

Best

Klaus
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Images in Livecode

Post by [-hh] »

This is related to a problem discussed in this thread:
Separating alphaData and imageData when saving and saving in one file.
I use parts of the scripts that I posted above for the JPNG compression:

JPNG (named using JPEG and PNG) is not an image format but a compression method.
We use the file ending ".lcjpng" for that.

It takes features from both JPEG (setting JPEGquality to compress the imageData and from the PNG compression the alphaData/transparency). It saves the alphaData, optionally the maskData, and the JPEG-compressed imageData in one file. The compressed image has here, using a JPEGquality of 80, around 25% of the PNG-compressed size.

So this may be interesting for people who wish to compress the images in their stack/standalone and decompress only some images for "current" use.

Compression/Decompression is very fast.
See stack "JPNG" via the "Sample stacks" of the LC toolbar or (slower) here:
http://livecodeshare.runrev.com/stack/841/JPNG
shiftLock happens
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Images in Livecode

Post by bidgeeman »

[-hh]
That stack is fantastic! Can I ask where the processing is done?
Just by naming it as "JPNG" does the file extension refer to a library to process/compress the PNG data?
(Complete beginner questions please forgive).

Bidge
Post Reply