Resizing an Image on the fly

Hi,

I am trying to figure out a quick and easy way of how to take an image that is submitted and change the width and height of it to a determined size. Say I have a 1600 X 1200 image and I want to scale it down to 480 X 360.

Lets say we have an image that is 1000 X 500, I want it to scale it down to 480 X whatever.

I want the Max height of the image to be 480 X (whatever) or the MAX width (whatever) X 360.

I actually want to change the file size, not just set the width and height on the image. I want to actually modify the image and make it smaller in width, height and size.

Does anyone have some code, a .ntf, or a place I can go to look at something like this?

Subject: Resizing an Image on the fly

Adobe Photoshop has the code you need.Lotus Notes doesn’t!

Subject: RE: Resizing an Image on the fly

I know that Adobe does that. I want to do it on the fly in Lotus Domino and not have to save a picture, resize the picture and then copy it back on the document while deleting the oversized image. There has to be some code out there somewhere, but thanks for your idea.

Subject: RE: Resizing an Image on the fly

Good gosh, why do you think there “has to be some code out there somewhere”?

Subject: RE: Resizing an Image on the fly

Someone must have the same interest as me and have tried to get a solution for this problem, that is why I think there is some code out there.

Subject: RE: Resizing an Image on the fly

For everyones information this is how I am going to work out my problem. SINCE No One has ever posted a plan of attack.

  1. User will attach an image to a document over the web.

  2. JavaSript will be used to check to see if it is a JPG or GIF file.

  3. Agent will run on the Save of Document.

  4. Within agent, I will use extractfile(lotusscript call–>lookit up) to a c:\TEMP on the server

  5. From here I will use Shell call(LS Call) and run a .bat file somewhere on the server which will run a command line from Easythumbnails from http://www.fookes.com/ (free app)

  6. This will create the resized image and then from there I will take the resized image and attach to the current document I have a handle to.

These are just some thoughts of what I am going to do for this problem. If you see a problem in these thoughts or have a different solution, you know where to post it.

Subject: RE: Resizing an Image on the fly

Besides the one Rod posted, you mean. And besides the others that have been posted in the past (using either Java or the Win32 API as appropriate), of course. Use the search – people are only going to post the same code/strategies so many times before they start ignoring repeated questions.

Subject: RE: Resizing an Image on the fly

If you really thought that, then you would have searched these forums. You would have found replies to similar questions that other people have asked inthe past, like this one a few weeks ago.

Subject: EOF : Resizing an Image on the fly

Hey if you think my response is a repeat question, dont answer it or just put Repeat question, SEARCH FORUM WITH FOLLOWING …, where … is what I should search for. When I searched I said Picture and got no hits, that is why I posted this. Then I saw that I was using wrong word, should have been IMAGE. Sorry for asking a question on a forum. ISNT THAT WHAT IS SUPPOSE TO BE USED FOR! Thanks for all the help and answers.

Subject: Way to go for help (WAS: EOF : Resizing an Image on the fly)

Rod is one of the finest contributors to this forum, and has provided you with a link that may be of use.

Might I suggest you follow how this forum works instead of just slamming people who offer help and advice (searching and using the FAQ being prime examples of good advice).

Subject: Resizing an Image … one solution

I’ve been playing with a few software that do just what you are looking for.

I’ve finally selected a product named “NConvert”, a command line utility that i’m calling from a LS Shell command in my code.

This product is freeware for personal use and is available for many plateform (Win, Dos, Mac X, Unix, Linux, AIX …) and it will resize and convert from and to almost any format you are ever likely to find. It is a snap to install and will run as easely on a client as on a server.

I’m still building my application so I do not have any Hard data on scalability but I can tell you that it is running fast on my Win2000 dev server.

You can fnd the product at : www.xnview.com

Another product that can do the rezine part from a command line is EZThumb. Ive experimented with it and found it lacking compare to Nconvert but a lot more user friendly. A project on OpenNtf.org is using it to do picture rezine ( Open Notes Pictures ) You can get some info from them on How they use the product in their code (client side)