How to copy clipped rect of an image to another filename?

</> button * homework policy * asking questions
I think the topic name is self-explanatory. Please help me.

Look up the references for these:

image

image

They are self explanatory.

:)

1 Like

Thanks, @glv, but it is saving the entire frame. I want to save only the clipped portion of the image.
Regards.

Hi

You must use the correct syntax for get() to get a section of an image.

Find the reference for get() and it will elaborate on this

The same applies for a PImage save.

As a beginner it is important to become familiar with the resources available to you.

Resources here:

:)

Thanks a lot. I think with correct syntax of get() and Pimage.save() I can achieve desired result.
Regards.

1 Like

PImage new1 = oldImg1. get(30,200,60,60);

new1.save(…);

1 Like

Hello,

You certainly will!

References:
Reference / Processing.org < get() and save() for a PImage are in there!

There are two references for get():

If you want to explore further there is a tutorial on Images and Pixels and Render Techniques

:)

Thanks and regards, @glv,
It worked well. I have achieved the desired result.
Soon I’ll present the synopsis of my undergoing App. I hope, you will guide me.
Thanks for everything.

1 Like