2004-07-06 07:34:28
Hi,
I have PhotoShop 7.0 installed. I would like to write a small visual basic program that opens some image files (bmp, tif or jpg), resizes them and then saves them as jpg, using the PhotoShopTypeLibrary. This way, I can quickly resize all my images for use on my website.
I already managed in my VB program to open PhotoShop, to open the image files and to play actions on the image files. This is not enough.
What I also need to be able to do is determine the width and height of the original image file, so that I can choose between the action that resizes to 640x480 and the action that resizes to 480x640.
The second problem is the SaveAs method. I only manage to use it to save the bitmaps in de psd format, but I would like to save them as jpg so that I can use them on my website.
Maybe here I can create a "SaveAsJpg" action that saves the file in the temp folder. Then my VB program would have to move the file to the correct folder and rename it? But that seems as quite a workaround...
Any ideas if it is possible to determine the width en height of an image file using the PhotoShopTypeLibrary?
Any ideas if saving the image as jpg can be done more easily then my workaround described above?
Veerle
I have PhotoShop 7.0 installed. I would like to write a small visual basic program that opens some image files (bmp, tif or jpg), resizes them and then saves them as jpg, using the PhotoShopTypeLibrary. This way, I can quickly resize all my images for use on my website.
I already managed in my VB program to open PhotoShop, to open the image files and to play actions on the image files. This is not enough.
What I also need to be able to do is determine the width and height of the original image file, so that I can choose between the action that resizes to 640x480 and the action that resizes to 480x640.
The second problem is the SaveAs method. I only manage to use it to save the bitmaps in de psd format, but I would like to save them as jpg so that I can use them on my website.
Maybe here I can create a "SaveAsJpg" action that saves the file in the temp folder. Then my VB program would have to move the file to the correct folder and rename it? But that seems as quite a workaround...
Any ideas if it is possible to determine the width en height of an image file using the PhotoShopTypeLibrary?
Any ideas if saving the image as jpg can be done more easily then my workaround described above?
Veerle
#1