Name and Path - RealWorld forums

Log-in or register.

Name and Path

Ronnie
on February 17th 2009

Hi,

New to this and searched a long time for this tool!!great.

In my pub images are resized at runtime, I whant to keep the original file name, and passed it to a custom directory,but can not get it, here is my code!
Some info

Params = "-o -q100 -w"+widthbewerk+" -h"+heightbewerk+ " " +afbeeldingbewerk

Params= variable that is passed to PhotoResize400.exe
widthbewerk and heightbewerk are variables from my pub to set the new dimensions, afbeeldingbewerk is the orginal path.

Hope someboy can help.

Thanks in advance.

Regards,
Ronnie

Vlasta
on February 17th 2009

-w and -h cannot be used simultaneously. Only one of the resizing methods can active. If you want to specify both dimensions, use -^XxY if you want to resize to given size ignoring aspect ratio. Or -fXxY if you want to specify maximum values for each direction and keep aspect ratio.

To specify output folder, use the -c switch + a parameter in quotes.

If you are using VB, the line could look like this:
Params = "-o -q100 -^"+widthbewerk+"x"+heightbewerk+ " -c""C:\myoutputfolder\<PATH><NAME>.jpg"" " +afbeeldingbewerk

Perhaps you'll need to escape the " and \ characters in a different way. Using extra double quotes around the input folder would be a good idea as well.

Ronnie
on February 18th 2009

Ok, with a different set of actions I made the actions I wanted. Now there is a second question.

Are there restrictions in file-size and craphic files ( bmp,jpg,etc.)?

Some files can not be transformed!!

Cheers

Vlasta
on February 18th 2009

It works only with .jpg files, but .jpg files in CMYK color space are not supported. There is no explicit size limit.

Ronnie
on February 19th 2009

Thanks for your comment.

Having another query. In previeuw the program works fine, but when I publisch my pub it does not do the action to resize the images, I included the executble in the programs dir, rename it back to it's original name but this makes no change.

Thanks in advance

Ronnie

Vlasta
on February 19th 2009

I am not sure I understand you. Are you actually saying, it does not work if you upload the tool to a web server and try to use it there? (Is the server running Windows?)

Ronnie
on February 19th 2009

Sorry, I will try to explain more cleary.

A. It's a standalone pub, when I publish it the exe.file I renamed to resize.exe is put in the publication dir of my program.

C:\Programfiles\TD\resize.exe

1. I copy the image to C:\Programfiles\TD\TILE\<filename>.jpg
2. I let perform the resize action with this command:
Params = "-o -q100 -^"+widthbewerk*2+"x"+heightbewerk*2+" "+SYSTEM_PUBLICATION_DIR+"\\Tegel\\"+afbeeldingbewerk12
The outpot would be for example:-o -q100 -^66x66 C:\Programfiles\TD\TILE\148x148_waa19765.jpg

In preview option of my program it works fine, but at runtime it doesnt work.

PD: I use Opus from Digitalworkshop, and posted this also on the forum but no answer that would solve the problem.

Ronnie

Vlasta
on February 19th 2009

The problem here might be that I do not know what a "standalone pub" is.

Anyway, a general advice would be to re-check the parameters you are sending to the tool. If there are spaces in the path to file, it must be enclosed in double quotes.

Ronnie
on February 19th 2009

Changed the output file and added quotes......works like a charme.

Thanks for your help.

Ronnie

Page views: 13620       Posts: 9      
Vista & Win 7 icons
What about ICL files?
I wish there were...