Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to resize image with different lengths on each side 1

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

Hi

I need to resize an image in such a way that for example, the left side is 100 pixels, right side 89, top 90, bottom 95 pixels.

Is this possible?

I am ok at resizing with equal sides but not sure about the rest.

Thank you
KB
 
You can't. Images are rectangles, and must have the same measurements in opposing sides. Which means the height of the image must be the same on the left and on the right, and the width must be the same on top and bottom.






----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 

So there is no way to do this? Do you know of any other software app that could?
 
Its not a matter of software apps. All images are by creation rectangular. Think of an image as a container, a rectangular container. Inside the container is your drawing.

I presume what you want is not to change the shape of the image, but to make a shape inside it of those dimensions.

What you would need to do is draw the shape inside an image big enough to fit the shape.

For example:
This is a shape with sides of different lengths. However the image itself has a height and width of 128px. whatever is not part of the shape is transparent so you can't see it.

shape.gif


If i fill in the rest of the image then you can see it is a square with a figure inside it.

shape-1.jpg





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 

Hi vacunita

Thank you for the comprehensive explanation.

Now that you have shown an image/shape which is very similar to one I have, what I am trying to achive is to put an existing image inside the confines of that shape.

So in other words, I will have a rectangular image with a diamond shape with an image inside that diamond shape.

I hope that makes sense.

Lee
 
Yes, that makes sense.

Create an image big enough to hold your diamond.

Make sure its background is transparent.
Draw your diamond, and then copy and paste the picture you want onto the diamond.

You will then need to save the file either as a GIF or PNG to preserve the transparency. JPG's don't support transparencies.

You can use the Export Feature from the file menu for this.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top