Any way to get the scaling factor of an object?

Corel Paint Shop Pro

Moderator: Kathy_9

paulzimmer
Posts: 11
Joined: Fri Apr 17, 2020 1:01 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by paulzimmer »

migf1 wrote:You are very welcome Paul, I am glad it proved helpful.

You can create guides by dragging the mouse starting it from within a ruler (View->Rulers, if you don't have them visible). Like this: https://gyazo.com/d024bae9f92cfd7db844a23661b1cd64

Once created, Rulers can be moved by dragging their handles inside the ruler area. You can even right-click on their handles and manually set their position, and change their color.

So, I created 4 guides touching the 4 corners of the dress, then I used the Rectangle selection tool to select the inner area defined by the guides. Then I promoted that selection to a new layer, So now in the layers palette I had the promoted layer (along with the layer of the red dress). By selecting them both (the promoted layer first) I could use the Object->Align and Object->Make Same Size commands. The red dress probably had a slightly different aspect ratio though.. because it didn't align exactly. I had to slightly stretch it width-wise with the Pick tool.

Greetings!
Woohoo! That worked great. Now I've got rules ("guides") in my toolkit.

"The red dress probably had a slightly different aspect ratio though" - if you run through LeviFiction's history math in detail, it seems that PSP may not have scaled precisely:
1667/627 = 2.65869218501 (pre-scale AR)
1896/713 = 2.65918653576 (post-scale AR)

It's funny. When I think back on the real project, I DID finally give up on just scaling the color image and went to stretching x and y - on the assumption that this would end up the same as scaling. But, if PSP's scaling is not quite exact, this would explain why the pure-scale approach didn't work.

Thinking about it, PSP probably cannot scale precisely because it must quantize to whole pixels. Since it appears that the tool does destructive scaling, this means that the AR is probably distorted with every scaling, and the errors add up.

Paul
paulzimmer
Posts: 11
Joined: Fri Apr 17, 2020 1:01 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by paulzimmer »

migf1 wrote:You are very welcome Paul, I am glad it proved helpful.

You can create guides by dragging the mouse starting it from within a ruler (View->Rulers, if you don't have them visible). Like this: https://gyazo.com/d024bae9f92cfd7db844a23661b1cd64

Once created, Rulers can be moved by dragging their handles inside the ruler area. You can even right-click on their handles and manually set their position, and change their color.

So, I created 4 guides touching the 4 corners of the dress, then I used the Rectangle selection tool to select the inner area defined by the guides. Then I promoted that selection to a new layer, So now in the layers palette I had the promoted layer (along with the layer of the red dress). By selecting them both (the promoted layer first) I could use the Object->Align and Object->Make Same Size commands. The red dress probably had a slightly different aspect ratio though.. because it didn't align exactly. I had to slightly stretch it width-wise with the Pick tool.

Greetings!
Forgive me if this is a duplicate, but I posted this and it never seemed to show up in the thread:

Woohoo! That worked great. Now I've got rules ("guides") in my toolkit.

"The red dress probably had a slightly different aspect ratio though" - if you run through LeviFiction's history math in detail, it seems that PSP may not have scaled precisely:
1667/627 = 2.65869218501 (pre-scale AR)
1896/713 = 2.65918653576 (post-scale AR)

It's funny. When I think back on the real project, I DID finally give up on just scaling the color image and went to stretching x and y - on the assumption that this would end up the same as scaling. But, if PSP's scaling is not quite exact, this would explain why the pure-scale approach didn't work.

Thinking about it, PSP probably cannot scale precisely because it must quantize to whole pixels. Since it appears that the tool does destructive scaling, this means that the AR is probably distorted with every scaling, and the errors add up.
paulzimmer
Posts: 11
Joined: Fri Apr 17, 2020 1:01 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by paulzimmer »

Aha - I see now that the forum uses pages rather than just a continuous list of replies. My reply was on (insert Paul Harvey voice), "page two".
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by migf1 »

Actually, I don't remember which version it started from, but scaling with the Pick tool more often than not screws up the aspect ratio (by a little bit, but it does).

That's a big reason I made it a habit to drag the layer out as a new image, resize it with Shift+S then bring it back as a new layer to the main image. The other big reason is that every move you make with the Pick tool is destructive.

So for example, if you scale something with the Pick tool and it takes you say 5 tries to get it right, you have performed 5 destructive steps on that raster. What I do in such cases is to keep a backup of the layer (duplicate), I then scale with the Pick too till I get the size I want, then i drag out the scaled layer as a new image just to see what are its dimensions, and I close it. I then drag the original layer as a new image too, and resize it with Shift+S to those dimensions and I bring it back as a new layer. This way I am destructing my final raster just once.

PS. I think that's the reason why Ps scale tool (Transform) requires you to hit Enter to finalize the transformation (it destructs it just once, when you hit Enter).
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by migf1 »

Sorry, I just noticed these...
paulzimmer wrote:
migf1 wrote:Hi Paul,

I think a different workflow would make things much simpler. For example, having the red dress into master as a layer (or even better keeping a mask of the dress) before cropping and scaling.
I'm not sure I know what you mean. If you mean, "know in advance that you're going to want to do something later with the object you're about to crop and scale", well, I rarely know this in advance. And doing this by default seems like it would create an mess.
How do other people work? If you're going to go hacking around on an object (cutting out bits and pieces, adding more background with clone brush and/or cut/paste, etc), do you do this in another tab?

Thanks,
Paul
Like Levi, I also try to work non-destructively (at least most of the time). Doing so in PSP is often a bumpy road, and many times requires to keep more duplicates compared to other programs, but all in all it can be fairly done.

As for intermediate steps, it depends on the project. If I really need to be able to get back to them, I save them inside the same file (btw, at this point I can't praise enough Corel decision to FINALLY offer us after ALL these years the Merge Selected/Visible as New layer option). I also work a lot with masks (yeah, I stress the hell out of PSP and quite often it gets back at me harder LOL)
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
paulzimmer
Posts: 11
Joined: Fri Apr 17, 2020 1:01 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by paulzimmer »

Boy, are the folks on this forum always this helpful, or are you all just bored out of your minds in quarantine? :-)

Seriously, thanks for helping. Looks like I should go learn a little more about masks. I've only ever used them before while following "recipes" online.

Thanks,
Paul
paulzimmer
Posts: 11
Joined: Fri Apr 17, 2020 1:01 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by paulzimmer »

migf1 wrote:Actually, I don't remember which version it started from, but scaling with the Pick tool more often than not screws up the aspect ratio (by a little bit, but it does).

That's a big reason I made it a habit to drag the layer out as a new image, resize it with Shift+S then bring it back as a new layer to the main image. The other big reason is that every move you make with the Pick tool is destructive.

So for example, if you scale something with the Pick tool and it takes you say 5 tries to get it right, you have performed 5 destructive steps on that raster. What I do in such cases is to keep a backup of the layer (duplicate), I then scale with the Pick too till I get the size I want, then i drag out the scaled layer as a new image just to see what are its dimensions, and I close it. I then drag the original layer as a new image too, and resize it with Shift+S to those dimensions and I bring it back as a new layer. This way I am destructing my final raster just once.

PS. I think that's the reason why Ps scale tool (Transform) requires you to hit Enter to finalize the transformation (it destructs it just once, when you hit Enter).
After I played with this in the example a few times, I went back and applied this technique (external resize of the to-be-pasted image) to the real design. I was only really making sure it worked on this more complex example. To my surprise, the result was MUCH BETTER. Not because of the AR - because of the image quality. All those resizing apparently took their toll on the image quality as well. Done this way, the overlayed image is much sharper than what I had originally.

Thanks!!!
Paul
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Any way to get the scaling factor of an object?

Post by migf1 »

You are very welcome Paul!

Yes, it does make a big difference indeed. Especially with small images (with big ones you can get away a few times, due to the massive amount of pixels they are made of.. the more the pixels, the more steps until the distortion starts to show up visually)
paulzimmer wrote:Boy, are the folks on this forum always this helpful, or are you all just bored out of your minds in quarantine? :-)
Haha, probably a little of both I guess :)
...Looks like I should go learn a little more about masks. I've only ever used them before while following "recipes" online.
Only if you have to. I mean it all depends on the project. Masks are a powerful tool, but nothing like "must use no matter what". Plus in PSP they add lots of visual bulk in your layer palette (each mask creates its own group).
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
Post Reply