Resize image dynamically

hello guys i have a case to reset image resolution size. I have created the activity but I have problems when I run it at the image saving stage. Images are saved by replacing previously existing images. can anyone help?
resizeimage.zip (318.3 KB)

So u don’t want them to be replaced
If yes then you can keep them copied as a folder or file and then do the changes
As the activity is meant to replace the existing image

@gilang_mandiri

1 Like

yes, sir. I want the images that have been successfully resized to be saved one by one without replacing them. Can you give an example, sir?

1 Like

May be before resizing have a copy of it

Hope you must be using a loop to resize for each file
Within that loop before using resize activity use a COPY FILE activity and have a copy of that file somewhere and then resize it

So that u will be having both the old files copied somewhere and also the resized file in the actual folder path

@gilang_mandiri

2 Likes

Hi,

Can you try to set CurrentIndex.ToString at FileName property of ImageResizer as the following?

image

Regards,

1 Like

okay sir, but we have a miss understanding. What I mean is that this activity saves repeated image size changes by replacing the first image saved with the last image. and what I want is separate storage without having to replace the first image to the last. This causes only one image to be stored

This looks contradictory isn’t it
U mean u don’t want to replace the file but to have only one image finally
I couldn’t get that @gilang_mandiri

1 Like

I will try it, thank u
is it the same to use assign to index (int32) then index+1? I tried using assign for the file name but it’s the same.

Hi,

If you want to use index variable, it’s necessary to modify “Do” to “Main Sequence” at Scope as the following, because the variable is reset every time if its scope is Do.

Regards,

2 Likes

no sir, the problem is that the earlier file naming is stored the same as the last file naming. so that when it is saved, the existing file is replaced. so this has nothing to do with the file before it was changed because I saved it in another folder

perfect, it’s work!
thank u so much sir.

1 Like

Sir how to change the resolution but not reduce the quality

HI,

In general, if you want to enlarge the image (this means resize from 100x100 to 200x200), Quality degradation is inevitable. We can choose algorithm to resize image such as NearestNighbor, Bilinear or Bicubic etc.( we need to use Graphics class etc for this)

The following content will help you

Regards,

1 Like

thank you for information, Sir

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.