Speeding up the display of a large jpg image

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

Post Reply
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Speeding up the display of a large jpg image

Post by Mag »

Hi all,

I'm creating a gallery with a single card and an image control. When user swipes a new image is displayed setting fileName property of the control (I'm using a lock screen with effects to give the perception of switch from an image to another). Somebody of you has find a way to improve the speed of displaying a large image in a image control? :oops:
ChrisMukrow
Posts: 73
Joined: Mon Nov 12, 2012 4:13 pm

Re: Speeding up the display of a large jpg image

Post by ChrisMukrow »

Hi,

How big is your image, because we're doing the same on iOS (iPhone), without any performance problems.
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Speeding up the display of a large jpg image

Post by Mag »

Great to hear this.

The image control size depends by the width of the device's display, for example 1600 px in a Kindle Fire.
The image file size depends on device's camera, for example 2400x3200 px in a Kindle Fire.

There's just a little 'late, I'd love if you could eliminate.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Speeding up the display of a large jpg image

Post by jacque »

You might want to experiment with the "prepare image" command. That preloads them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Speeding up the display of a large jpg image

Post by Mag »

Thank you, it has to be used a bit before the image is actually needed right?
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Speeding up the display of a large jpg image

Post by jacque »

Right, you'd probably want to preload the next one at the end of the handler that displays the current one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Speeding up the display of a large jpg image

Post by MaxV »

Did you change layer mode to Dynamic or Scrolling?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Speeding up the display of a large jpg image

Post by Mag »

jacque wrote:Right, you'd probably want to preload the next one at the end of the handler that displays the current one.
Thank you
MaxV wrote:Did you change layer mode to Dynamic or Scrolling?
I MaxV , could be useful?
MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Speeding up the display of a large jpg image

Post by MaxV »

Mag wrote:
MaxV wrote:Did you change layer mode to Dynamic or Scrolling?
I MaxV , could be useful?
I read something about it, it changes the update process and it's recommended to change it Dynamic for games and frequent updates.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Speeding up the display of a large jpg image

Post by Mag »

Interesting, I will read up on this.
Post Reply