help needed with copy 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
Happyrever
Posts: 55
Joined: Sat Sep 10, 2011 12:22 pm

help needed with copy image

Post by Happyrever » Tue Nov 29, 2011 2:48 pm

In windows I used this code in a slider to change the blend level of an image.

put image "Frontpagebackground" on card 1 into image "CoverThumb" on card 4
set the blendlevel of image "CoverThumb" on card 4 to blendvalue

The Frontpagebackground is on one card (not in view when slider moved) and the CoverThumb is reflecting the degree of transparency of the hidden Frontpagebackground.

Initially, the CoverThumb stayed blank, but without changes to code, spontaneously started working, all as intended. I was pleased with this and worked on another different part of the program.
Now, the CoverThumb will not work and stays blank.

Did I use the wrong code?

This code works, but causes a significant delay in appearing in the CoverThumb. (yes, I agree it is better it works all the time, but why did the first example stop working?)

export snapshot from image "Frontpagebackground" on card 1 to image "CoverThumb" on card 4 as jpeg

Your opinion please.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: help needed with copy image

Post by Klaus » Tue Nov 29, 2011 2:54 pm

Hi Happy,

the syntax looks correct!
But I would use "OF card X", not "ON card X".

So I have no idea what goes wrong here.

But:
In windows I used this code in a slider to change the blend level of an image.

put image "Frontpagebackground" on card 1 into image "CoverThumb" on card 4
set the blendlevel of image "CoverThumb" on card 4 to blendvalue
are the last two lines in the script of the SLIDER?
That woud mean that the image gets copied ALL the time you move the slider!

Best

Klaus

Happyrever
Posts: 55
Joined: Sat Sep 10, 2011 12:22 pm

Re: help needed with copy image

Post by Happyrever » Tue Nov 29, 2011 5:14 pm

Hi Klaus,
I will retry the original code with the change in "OF" and see if that cures it. Thank you.
Yes, I do know the copy is repeated on every slide, but it was just something I tried in the elimination process.
When up to ass in aligators, you tend not to think about draining the swamp.

By the way, I suspect you are a Mac person rather than PC and I wonder if you have come across this issue.

Basic stack with no controls, code or anything on it with these locked sizes Width 1255 and height 720 produced on a PC.
Run this on a Macbook (Old) to find the stack bottom sliced off and smaller height value 654.
Put a bit of code in to resize the stack to 1255 and 720, but it still over rides on the Mac.
You can manually resize on the mac (after unlocking) and it stays.
Most anoying for me as the project was for PC and Mac.

Any views?

Happyrever
Posts: 55
Joined: Sat Sep 10, 2011 12:22 pm

Re: help needed with copy image

Post by Happyrever » Tue Nov 29, 2011 5:31 pm

Hi Klaus,
I have just tried the OF in place of ON and it still will not work.
It might in some other case, but not here.

I have uncovered 2 confirmed bugs (by runrev) to do with the pdf and graphic border (not image border) and I wonder if the current version 5 is a bit dodgy at the moment.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: help needed with copy image

Post by Klaus » Tue Nov 29, 2011 6:32 pm

Hi Happy,
Happyrever wrote:Hi Klaus,
I will retry the original code with the change in "OF" and see if that cures it. Thank you.
This is just be a cosmetic thing, but ON is not the official syntax, so I just wanted to be sure!
Happyrever wrote:By the way, I suspect you are a Mac person rather than PC
Yep :D
Happyrever wrote:By the way, I suspect you are a Mac person rather than PC and I wonder if you have come across this issue.
Basic stack with no controls, code or anything on it with these locked sizes Width 1255 and height 720 produced on a PC.
Run this on a Macbook (Old) to find the stack bottom sliced off and smaller height value 654.
Put a bit of code in to resize the stack to 1255 and 720, but it still over rides on the Mac.
You can manually resize on the mac (after unlocking) and it stays.
Most anoying for me as the project was for PC and Mac.
Any views?
Hm, have to guess.
What was the monitor resolution of that old MacBook?
LiveCode also resizes stacks to the "windowBoundingRect", check the dictionary for more info!


Best

Klaus

Happyrever
Posts: 55
Joined: Sat Sep 10, 2011 12:22 pm

Re: help needed with copy image

Post by Happyrever » Tue Nov 29, 2011 6:42 pm

Well, there are plenty of pixels to spare. The full stack size and the bottom Mac bar is well within the page, still, I will read up on that.

Post Reply