ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Layer Resizing is lowering image quality
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Oct 29 2018 :  03:21:26  Show Profile  Reply
Hello,

We have observed that if a user resizes a layer (either reduces its size or at times enlarges its size) the content of that particular layer start showing jazzy edges. This is noticeable especially in regions where color changes.

How to handle this situation? Please advise.

TIA


Yogi Yang

xequte

39052 Posts

Posted - Oct 29 2018 :  16:54:19  Show Profile  Reply
Hi Yogi

Is this just on preview, or even when the image is merged?

What is the value of LayersFastDrawing?

https://www.imageen.com/help/TImageEnView.LayersFastDrawing.html

And the ResampleFilter of the image layer?

https://www.imageen.com/help/TIEImageLayer.ResampleFilter.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Oct 30 2018 :  06:27:33  Show Profile  Reply
Hello,

I think I should have mentioned in my first post that:

What I am doing is loading an image and them adding a layer in which I am again loading the same file.

Now I am scaling the layer to a small size interactively using mouse.

Again I am loading the same image on another layer and scaling this new layer to a bigger size (approx 120% of original size) interactively using mouse.

Now I am saving the file with all its layers intact to a PSD format.

This file is then loaded into Photoshop. In Photoshop I observed that the scaled layers are loosing their finishing and showing jazzy edges.

 
Is this just on preview, or even when the image is merged?

Sorry I have not merged the layers and checked. I will check it out and get back to you on this.

TIA



Yogi Yang
Go to Top of Page

xequte

39052 Posts

Posted - Oct 30 2018 :  15:26:47  Show Profile  Reply
Sorry Yogi

It is hard for me to visualize that.

Are you able to reproduce in one of our layer demos (with some small code changes)?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Oct 31 2018 :  02:36:22  Show Profile  Reply
Hello Nigel,

Just for your ready reference I am attaching sample images download link to this post.

In the file - T-layered.psd there are three layers where
  • Layer 1 (with an O in center) is Original image in its original size
  • Layer 2 (with a S in center) is Small size image, here the image is enlarged and reduced multiple times interactively
  • Layer 3 (with a B in center) is Enlarged image

The file T-merged.jpg contains all layers merged using rfLanczos3 resample filter but there is not difference in quality.

Download from: https://mega.nz/#!DwwnHIyA!kTqzzg9w9lHLQ3jO3PC7ly_od0_8JZWLRhcIQCsZ6s4

TIA


Yogi Yang
Go to Top of Page

yogiyang

India
727 Posts

Posted - Oct 31 2018 :  02:47:08  Show Profile  Reply
Hello Nigel,
 
Sorry Yogi

It is hard for me to visualize that.

Are you able to reproduce in one of our layer demos (with some small code changes)?

I have modified the Demo (Demos\LayerEditing\Layers_AllTypes) Layers.dproj for this.

Here is the download link of the source: https://mega.nz/#!rx5HRI6R!B479Hnz45QfDxM9omE_yCW-tUmDIK6m_p0PxJ6-pSKE

TIA


Yogi Yang
Go to Top of Page

xequte

39052 Posts

Posted - Nov 01 2018 :  16:02:04  Show Profile  Reply
Hi Yogi

How do I reproduce the issue with this demo?

Also, remember than image resizing (that is, resampling it to a new size) is a destructive operation. It is not something that should ever be done to an image more than once or twice.

If you have need to frequently resize an image (e.g. to make many copies at different resolutions), always go back to the original image and use that to create the resized copy.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Nov 12 2018 :  01:26:33  Show Profile  Reply
Hello,

 
Also, remember than image resizing is a destructive operation. It is not something that should ever be done to an image more than once or twice.

In any image editing software user will always be resizing layer content interactively with mouse in 80% of the cases. This resizing of image should not be destructive. I am saying this because when a user resizes a layer the number of pixels are always going to remain the same irrespective of the fact whether the layer is enlarged or reduced.

 
If you have need to frequently resize an image (e.g. to make many copies at different resolutions), always go back to the original image and use that to create the resized copy.

I also want to make it clear that by resizing I am not talking about resampling.

TIA


Yogi Yang
Go to Top of Page

xequte

39052 Posts

Posted - Nov 12 2018 :  17:27:02  Show Profile  Reply
Hi Yogi

I cannot reproduce this with the demo. Can you give me the steps?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Nov 13 2018 :  01:40:28  Show Profile  Reply
Hello,

Steps to reproduce the problem:

1. Load an image using menu File->Open Image... (select an image that has round/curvature shapes for better understanding)
2. Again Load an image using menu File->Open Image... when asked to add a new Layer say Yes. Here take care to load the same image you loaded in step 1.
3. Repeat step 2. After this step yo should have three layers.
4. Unlock Layer 1 and Layer 2
5. Select Layer 1 from Layer List and resize it using the sizing handles/grips to a smaller size approx 1/4 of its original size
6. Move Layer 1 to a new location
7. Again resize it to it original size (try to come as need as possible to the original size)
8. Select Layer 2 from Layer List
9. Resize it to a a bigger size approx 150% of its original size move it to a new location
10. Again select Layer 1 from Layer List and resize it to a smaller size approx 1/4 of its original size
11. Save the resulting image by clicking on menu File->Save to PSD...
12. Open this file in an image editor that supports Photoshop PSD files with layers like GIMP, Affinity Photo, etc. (preferable is to use Photoshop itself) and observe the quality of each layer, esp. observe the curvature part of the image at 100% zoom

Hope this will get you started.

TIA


Yogi Yang
Go to Top of Page

xequte

39052 Posts

Posted - Nov 20 2018 :  20:22:31  Show Profile  Reply
Hi Yogi

I do see that when a PSD file is loaded in some applications, the resolution has been reduced to its display size (i.e. cannot be enlarged). When the PSD is loaded into ImageEn it works as expected (image can be enlarged to its original size).

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Nov 20 2018 :  23:24:30  Show Profile  Reply
Thanks for confirming.

But is there any solution for this?

Because in our case once the primary design(layout) is created in our software the file is saved as PSD and then finishing touch is given in Photoshop by users.

TIA


Yogi Yang
Go to Top of Page

xequte

39052 Posts

Posted - Nov 21 2018 :  02:42:01  Show Profile  Reply
Hi Yogi

If you do the same thing all within Photoshop, when you reload file can you enlarge the layer (and still have the quality)?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Nov 21 2018 :  23:27:55  Show Profile  Reply
Hello Nigel,

The answer is Yes.As long as we enlarge the image up to 150% of its original size it is not a problem.

If we reduce the size of the image from its original size the quality is not affected even if the image is later enlarged!

TIA


Yogi Yang
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: