- Home /
crop an image from WWW
Is there a way to select and crop an area of an image downloaded using www class during run time? Ideally, I want to get the image, select the part I want using mouse coordinates (rect), and then apply that cropped image as texture to a cube or some other primitive object.
I have the www part and can apply the texture to my game object. What I would like to know is how to use the mouse to crop image before applying as texture. Can I access mouse coordinate when dealing with www image or texture?
Is this the right approach? Or is it better to apply the texture to a cube and then scale and offset the texture to show area you want? And are both options possible using mouse drag?
update: another approach i might try is to create a square based on two points given(GetMouseButtonDown and GetMouseButtonUp) based on raycast. Then that would be my hypotenuse. I could then try to get the rect from that. Then maybe somehow use the getpixel() get that area and apply that towards a new texture (setpixels).
Thanks in advance, Actionevent
Your answer
Follow this Question
Related Questions
Issue with UnityWebRequest 1 Answer
Create a texture dynamically 1 Answer
How to dispaly list of images from server on GUI? 1 Answer
Invert Texture 0 Answers
Play sequence of images 0 Answers