Replace image - size issue

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Replace image - size issue

Postby rylleman » Tue Jun 21, 2005 2:57 pm

When replacing bitmap artwork through "source image..." the new bitmap is stretched/squashed to fit the same space the old one occupied which means that if you make any changes to a piece which involves making it a different size you have to import it as a completely new image and go through the setup process for that part all over again, position/rotation/scale, bone rigging etc.
User avatar
rylleman
 
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden

Postby jorgy » Tue Jun 21, 2005 4:04 pm

Sometimes I use this as a fact. Maybe a checkbox like "Keep current animation in place during import?" is called for?
User avatar
jorgy
 
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Postby rylleman » Tue Jun 21, 2005 5:23 pm

I agree, a tick box to choose if I want this or not would be a good solution.
User avatar
rylleman
 
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden

Postby nobudget » Tue Jun 21, 2005 6:44 pm

Right now I just make sure the dimensions are the same when I replace it. If I use a transparent .png for example I create it on a canvas with identical size.

Reindert.
www.nobudgetvideo.com
nobudget
 
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm

Postby rylleman » Tue Jun 21, 2005 7:11 pm

I try to do that as much as possible as well but sometimes that is impossible.
It only works if you change the part to a smaller size. I guess that you could always work with an empty safe area around your images but that would add unessesary weight to them as well as some extra steps when creating your artwork.
User avatar
rylleman
 
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden

Postby nobudget » Tue Jun 21, 2005 7:18 pm

You're right, but planning will always be an important part of animation. I should know, I never plan ahead and have to work myself out of problems constantly! Storyboards? We don't need no stinkin' storyboards!

Reindert.
www.nobudgetvideo.com
nobudget
 
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm

Postby jorgy » Tue Jun 21, 2005 8:03 pm

I'm thaaaaaaaaaaaat close to having my first animation done. And I swear, as God as my witness, that I will not do another animation without storyboards or an animatic.
User avatar
jorgy
 
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Re: Replace image - size issue

Postby Ponio » Thu Jan 10, 2019 11:31 pm

This bug is still alive in 2019 (Moho 12.5) huh...

"Set Source Image" doesn't help at all, but I found out that if you do this "Set Source Image" routine via script, it fixes broken proportions.
I wrote a VERY simple script. There are two versions: first one fixes only selectad image layer and the second versoion fixes all the image layers.
To install it, just unpack all the files from ZIP archive to "...\Moho content\Moho Pro\scripts\tool\" folder and restart Moho. You will notice shrtcuts in the tools panel.

Hope it will help someone, cause I couldn't find any solutions for this annoying bug for a long time.

Script files: https://yadi.sk/d/UakPmCqbJUdO6w
or topic on the other forum if filehosting link is dead: http://2danimator.ru/showthread.php?t=10178
Last edited by Ponio on Fri Jan 11, 2019 1:58 am, edited 1 time in total.
Ponio
 
Posts: 3
Joined: Thu Jan 10, 2019 10:46 pm

Re: Replace image - size issue

Postby synthsin75 » Fri Jan 11, 2019 1:17 am

I, and probably many others here, don't remember my login for the Russian forum, so we can't download your script.
If you want to share it here, please upload it to somewhere like Dropbox, Mediafire, filedropper, etc. and post the link here.
- Wes
ImageImageImage
User avatar
synthsin75
 
Posts: 6930
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma

Re: Replace image - size issue

Postby Ponio » Fri Jan 11, 2019 2:03 am

synthsin75 wrote:I, and probably many others here, don't remember my login for the Russian forum, so we can't download your script.
If you want to share it here, please upload it to somewhere like Dropbox, Mediafire, filedropper, etc. and post the link here.

Oh thanks. I forgot that it won't work without authorization. Added link to file hosting.
Ponio
 
Posts: 3
Joined: Thu Jan 10, 2019 10:46 pm

Re: Replace image - size issue

Postby Greenlaw » Fri Jan 11, 2019 7:23 pm

@Ponio, the script sounds very useful, thanks for posting it! Like everybody else here, I wish there was native solution for replacing differently proportioned artwork with its correct proportions, so I'm looking forward to trying it out.

I won't be able to download the script until this weekend but I was wondering, what does the script do to adjust the replacement image to correct proportions? I'm assuming it locks either the x- or y-size to the previous image's size, and then adjusts the other size-axis to fit the new image's proportions. If so, which size-axis gets locked?
Last edited by Greenlaw on Fri Jan 11, 2019 8:36 pm, edited 1 time in total.
User avatar
Greenlaw
 
Posts: 4077
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles

Re: Replace image - size issue

Postby synthsin75 » Fri Jan 11, 2019 7:54 pm

Greenlaw wrote:I won't be able to download the script until this weekend but I was wondering, what does the script do to adjust the replacement image to correct proportions? I'm assuming it locks either the x- or y-size to the previous image's size, and then adjusts the other size-axis to fit the new image's proportions. If so, which size-axis gets locked?


It just resets the source image, but doing it by script seems to have some advantage over doing it manually. I think this just centers the image, instead of stretching it to the former dimensions.

It's basically only doing:
local image = moho:LayerAsImage(moho.layer)
image:SetSourceImage(image:SourceImage())
- Wes
ImageImageImage
User avatar
synthsin75
 
Posts: 6930
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma

Re: Replace image - size issue

Postby Greenlaw » Fri Jan 11, 2019 8:36 pm

Thanks for the explanation Wes! Much simpler than what I imagined. :)
User avatar
Greenlaw
 
Posts: 4077
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles

Re: Replace image - size issue

Postby Ponio » Sat Jan 12, 2019 1:15 pm

Greenlaw wrote:Thanks for the explanation Wes! Much simpler than what I imagined. :)

Yup, it was really that easy! I wonder why the same function works differently in UI and in script API.
Ponio
 
Posts: 3
Joined: Thu Jan 10, 2019 10:46 pm


Return to Bug Discussions

Who is online

Users browsing this forum: No registered users and 2 guests