What happened to lock size & location of images???

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Judy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 7
Joined: Wed Apr 20, 2011 9:41 pm

What happened to lock size & location of images???

Post by Judy » Sun Jan 08, 2023 2:46 am

This is making me even nuttier than I already was.

I swear that checking off a little box in the object inspector would allow your resizing of an image and location of it to "stick." But it's not happening despite 20 years of working.

This may seem unimportant, but when you are in the field of educational instructional design, it's a huge freaking deal.

A FB group has suggested work-arounds that work, but that still (a) requires additional work on my end and (b) leaves me wondering why it stopped working in the IDE.

I've also noticed that setting the windowShape to an image shape, which worked for me until maybe 4 months ago, and which had worked for nearly 15 years, no longer works.

Judy

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3468
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: What happened to lock size & location of images???

Post by mwieder » Sun Jan 08, 2023 4:22 am

So... I'm confused...

Import an image
Resize the image
Open the Property inspector
Select the Position tab
Check the Lock loc checkbox

The image size and position are now locked.

What am I missing?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8143
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What happened to lock size & location of images???

Post by richmond62 » Sun Jan 08, 2023 8:13 am

Which version of LiveCode are you using?

stam
Posts: 1824
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: What happened to lock size & location of images???

Post by stam » Sun Jan 08, 2023 8:48 am

If you’re resizing an image and it’s not sticking, it’s because you need to follow the advice from a fairly old LC lesson:

After resizing, you need to

Code: Select all

Set the imageData of image <resizedImage>to the imageDataof image <resizedImage>
HTH
S.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8143
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What happened to lock size & location of images???

Post by richmond62 » Sun Jan 08, 2023 10:21 am

I think, stam, that only is relevant if you are using external images referenced by a stack.

If an image has been imported, as long as it is locked it should stay the size is was locked at:

Here's a stack with an imported image that is 1200 x 630 pixels:
-
SShot 2023-01-08 at 11.15.57.png
-
Here's the same stack with the image resized and locked to 600 x 315 pixels, and saved:
-
P1.jpg
-
Having QUIT LiveCode and restarted it, on opening the stack we can see that the image has NOT gone
back to its original size:
-
P2.jpg

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8143
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What happened to lock size & location of images???

Post by richmond62 » Sun Jan 08, 2023 10:27 am

HOWEVER; here's an external image referenced by my stack:
-
P3.jpg
-
Resized and LOCKED:
-
P4.jpg
-
ODDLY ENOUGH . . .
-
P5.jpg
-
Behaves itself.

MacOS 13.2, LC 9.6.3 Community.
Last edited by richmond62 on Sun Jan 08, 2023 10:54 am, edited 1 time in total.

stam
Posts: 1824
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: What happened to lock size & location of images???

Post by stam » Sun Jan 08, 2023 10:42 am

And yet I had this issue when importing an image, not referencing it. Setting the imageData resolved the issue.
The OP reports that locking the image didn’t help. So I’m guessing setting the imageData will.
Perhaps the OP can report back to let us know if it helped…

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8143
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What happened to lock size & location of images???

Post by richmond62 » Sun Jan 08, 2023 10:55 am

2 questions (one of which I asked earlier):

1. Version of LC?

2. Operating system?

Judy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 7
Joined: Wed Apr 20, 2011 9:41 pm

Re: What happened to lock size & location of images???

Post by Judy » Wed Jan 18, 2023 12:29 am

Don't know what I did but it's working for me again. Probably stupid user error.

Thank you!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8918
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: What happened to lock size & location of images???

Post by dunbarx » Wed Jan 18, 2023 3:09 am

Don't know what I did but it's working for me again. Probably stupid user error.
This happens to me all the time. I consider it stupid author error.

Craig

Judy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 7
Joined: Wed Apr 20, 2011 9:41 pm

Re: What happened to lock size & location of images???

Post by Judy » Sat Jan 21, 2023 2:04 pm

Craig, Yep, a factor of life on my end but now I am wondering why I had the problem in the first place. Could low RAM be the cause? My old MBP that died had a whole whopping 8 GB RAM and when I replaced in in Nov/Dec, there was a sale and I stupidly (I think) allowed myself to be convinced that a MacBook Air with, yes, 8 GB RAM would be sufficient, the chip being more efficient blah blah blah. In retrospect, I am thinking he sounded a bit like Bill Gates in assuring 8 GB was all I'd ever need... :roll: :evil:

Another problem I had when trying to update my multiplication bingo game was that the windowShape property wasn't working. Quit all other apps and open LC again and, viola -- working again.

(runs off muttering into corner)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8143
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: What happened to lock size & location of images???

Post by richmond62 » Sat Jan 21, 2023 2:15 pm

I don't know what is going on with your laptop, Judy . . .

I do some of my LC work on my 2018 Intel Mac Mini with "only" 8 GB RAM: always manage to run another 5 or 6 apps at the same time
(Brave, GIMP, Inkscape, LibreOffice, Thunderbird, VLC) . . .

However, I often do stuff on a 'thing' with 512 MB RAM running Xubuntu, and have 1 or 2 apps running at the same time (GIMP, Office).

Post Reply

Return to “Multimedia”