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: FourthWorld, heatherlaine, Klaus, kevinmiller

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

Re: Images in Livecode

Post by bogs » Wed Aug 09, 2017 2:27 pm

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: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Images in Livecode

Post by Klaus » Wed Aug 09, 2017 2:35 pm

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: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Images in Livecode

Post by bogs » Wed Aug 09, 2017 3:46 pm

Sure glad I ain't no gentleman ! :P

You play a bass?
Image
Sounds fishy to me :P :P
Image

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Images in Livecode

Post by Klaus » Wed Aug 09, 2017 4:04 pm

Yes, I play Bass! :D
Attachments
BASS_player.jpg

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Images in Livecode

Post by jacque » Wed Aug 09, 2017 5:00 pm

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: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Images in Livecode

Post by richmond62 » Wed Aug 09, 2017 5:32 pm

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
Location: Göttingen, DE

Re: Images in Livecode

Post by [-hh] » Wed Aug 09, 2017 7:21 pm

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: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Images in Livecode

Post by richmond62 » Wed Aug 09, 2017 7:27 pm

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
Location: Australia

Re: Images in Livecode

Post by bidgeeman » Thu Aug 10, 2017 12:44 am

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: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Images in Livecode

Post by bogs » Thu Aug 10, 2017 5:04 am

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: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Images in Livecode

Post by richmond62 » Thu Aug 10, 2017 7:50 am

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
Location: Australia

Re: Images in Livecode

Post by bidgeeman » Thu Aug 10, 2017 9:54 am

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: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Images in Livecode

Post by Klaus » Thu Aug 10, 2017 10:04 am

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
Location: Göttingen, DE

Re: Images in Livecode

Post by [-hh] » Fri Aug 11, 2017 12:40 am

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
Location: Australia

Re: Images in Livecode

Post by bidgeeman » Fri Aug 11, 2017 1:40 am

[-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

Return to “Getting Started with LiveCode - Complete Beginners”