Image sizes

Posted on 2013-01-31
Last Modified: 2013-04-09
I'm getting images from a client.  They're in bitmaps.  The sizes of the images are all different.  Is there a way that I can display the images with the same size without screwing up the image?

Some are H400/V200, others are H200/V400, others are H600/V600.

Without editing every image is there a way to do this and retain the aspect ratio?

Question by:breeze351
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 53

Expert Comment

ID: 38840930
To have a common size and retain the aspect ration, you would have to put them in a graphics program and crop to the common size.  That of course removes part of the image, so it might be worse than re-sizing and changing the aspect ration.

You could also setup a container element big enough to accommodate the largest image and then just position within the frame.  There really is no good solution that fits the requirements; so you might need to reconsider design and display variable sizes.


Expert Comment

ID: 38841011
If "crop" image, then yes you loose picture, or you can just "resize", you not loosing but reducing resolution . That can be done with Microsoft paint, picture management and so on.
In webdesign, you can set automatic scale, so you dont have to worry about about manual modification.
Downside in this case, that for "unmodified-high resolution" pictures, depends on client download speed, can take a while to display image.

If both solution is not acceptable, then you can find some software which could do "resizing" automatically, making all pictures in common size+proportions.

Author Comment

ID: 38841115
How do you set up an automatic scale in webdesign?  And what is what is webdesign?

I've had to go through this before and I did re-size all of the images.  But in this case there are over 2,000.   When I did it the first time there were only 200.

If worse comes to worse, I have a job for my partner!

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 38841150
If you intent to use pictures to be display in website, then there is way, designing website in such way, that it will scale to fix dimension on screen, regardless of source picture resolution......
Or better yet have "middle man" software/method(automated) to reduce/scale picture, to desire size before uploading them to webserver.
Can you clarify where exactly end product-resized pictures will be used?

Author Comment

ID: 38841201
It's on the website.  Somebody on this side is going to have to go through and give me all the same size images.  Not only that, rename them to get rid of the spaces in the file names and clean up some other garbage.

This is the only thing that I can think of.  As soon as I saw this data I knew that I was going to have a problem.

I thought that you guys might have an easy way out of it.


Expert Comment

ID: 38841228
I see.
Well, there is always the way to do it, if you know for example that you will have that quite often, then it will make sense think about automation....
Otherwise probably manually is the way.........
LVL 22

Expert Comment

by:Kim Walker
ID: 38841704
If you have Adobe Photoshop, you could resize them all in automated batches. You would run one batch to resample the portrait oriented images to the same height and another batch to resample the landscape images to the same width. You'd just have to separate the portrait and landscape images into different folders manually. You could also set up the automation to add white space to the top and bottom of the landscape images and to the sides of the portrait images to prevent cropping them and still make them all the same width and height.

Author Comment

ID: 38844771
I have close to 29,000 images!!!!!!!!
Why the client never set up some type of image format is beyond me.  

It's a commercial real estate outfit in New York City.  What they do is hire college kids to go out during the summer, take pictures of the building and return it.

I have a son in a community college down the street.  I'm thinking "Robert, you want to make some money?"

If I set him up on another box and let him do this, this might me be the easiest way.

By the way I have "Adobe CS5.5"


Expert Comment

ID: 38844898
Never use Adobe for this purpose, but I would assume consider the # of pics, it could be complicated, not reasonable.

The only way I can think of, is separate images by folders (NY boros) and create subfolders to reflect website site search engine logic.
Then work files inside the folder, assigning them naming conventions and by the naming done, come up with scaling and resizing in batches- develop software program/find existing..........
Looks there many way to achieve what have to be done, question is choosing right, most efficient path..
LVL 35

Accepted Solution

Robert Schutt earned 500 total points
ID: 38844901
Funny, for a second I thought you were talking about me ;-)

I checked a piece of code I found on EE (by Ray of course) but couldn't get it to work with bitmaps. If you could automate converting to jpg then you could use it to generate thumbnails on the fly.

In the past I have used ImageMagick to resize uploaded images automatically in a classic asp website. Can you check if you can get that (or already have it) installed: 

Then it should be easy to generate thumbnails from your php code.

Author Comment

ID: 38866175
I will check out ImageMagick.  It seems like this might be the trick.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PDF Download Error - Operation or data is too complex. 4 46
need help with share buttons 11 75
Passing client data from form to server 5 25
Boolean 13 28
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question