You are not logged in.
I have a set of pictures... like 20 - 30 pics
i want to re size them in order to reduce their size in order to upload them faster and set them to standard width/height
your help is appreciated.. cuz uploading pic on a lebanese connection is causing me heart attacks ... ma2 dayen !
and i am not the type that will resize shi 50 pic maslan in photoshop
hope u got what i need.
thanks for the help !
Well in my opinion DO use photoshop quite easy, ... if you insist on not using photoshop, download and install WAMP, make a script(form_to_script) using gd2 library functions to achieve your goal ... if i have some free time later, i'll write the script
there is scripting in photoshop. You can record a macro then apply it to a whole directory.
Of course there are other tools. Paint.NET is a freeware that can resize photos, but i dont know if it can do batch/script/macro resizing.
In my opinion, use photoshop, if you have it, because i think it will provide the best quality.
Look in the Window menu for Actions, and in the File menu for Automate. use these to create a macro to resize the photo at your specification (its easy, just a matter of clicking record, resizing the picture, then clicking stop).
Then use automate to apply on all photos in the directory.
Last edited by rolf (April 15 2009)
*scratch mi head
oh thanks for the help guys ... it sounds scary a bit ... i will take a look at the whole automation stuff
I will try to learn doing it bl photoshop, cuz i can re-use this skill later
btw i know gimp has script fu as well.. i want to learn it to put it on CV as joke
so.. no external software , with resize all ... next ... next and finish ?
--EDIT :
thanks rolllff !! it worked ! YaY !
still if any external software ... next next finish will do it.. let me know.. cuz someone might be in charge of the resizing and it would be easier for me to explain
Last edited by mir (April 15 2009)
so i've made a quick and dirty jab at resizing using wamp, this is just for one image, a few adjustments are needed to automate the process for multiple images
first page: html form
<head><title>form_to_supply_images_to_script</title></head>
<body>
<form name="images_form" action="handle_images.php" method=POST enctype="multipart/form-data">
<fieldset>
<input type=file name=limage /> <br />;
</fieldset>
<input type="submit" value="Process" />
</form>
</body>
</html>
now handle_images.php code:
<?php
$img = $_FILES['limage'];
//image attributes made simpler
$img_name = $img['name'];
$img_size = $img['size'];
$img_type = $img['type'];
$img_tmp = $img['tmp_name'];
$img_ext = substr(strrchr( $img_name, "."), 1); // get extension
$img_ext = strtolower($img_ext); // to avoid some bugs
// here i am supposing that we're only working with jpg images, if not, it destroys the file and stops the script
if(($img_ext != "jpg") && ($img_ext != "jpeg"))
{
unlink($img_tmp);
die("file supplied is not an image");
}
list($width, $height) = getimagesize($img_tmp); //get image with and height
$src = imagecreatefromjpeg($img_tmp); // create a source image to use, raw image!
$new_width = 100; //resized image width, change this value to the one required
$new_height = ($height/$width)*$new_width; // to keep the aspect ratio
$tmp = imagecreatetruecolor($new_width,$new_height); //temporary image where resized image will be put
imagecopyresampled($tmp,$src,0,0,0,0,$new_width,$new_height,$width,$height); // the main trick
imagejpeg($tmp,$img_name,100); // create jpeg image from raw $tmp with the name $image_name with 100 percent quality, reduce quality to reduce size
Last edited by proners (April 15 2009)
nice, i didn't know that photoshop had this feature ...
p.s.: weird, dates of posts got messed up if you notice
my sister advises pixresizer (http://bluefive.pair.com/pixresizer.htm), she's the uploading-pics-to-facebook freak... (don't tell her i said that )
really thank you so much proner for taking the time :) ... really appreciate :) it didn't go to waste
battikh.. me is downloading and checking.. don't speak of uploading-pics-to-facebook-freaks 3mol ma3rouf ! at least not on a lebanese forum.. almost everyone will be offended
well all ways are helpful in a way or another.. i like hte photoshop way , i like proner way and battikh way :)
appreciate the help guys.. you rock \m/ .. ma bta3rfo adeish wafarto 3layeh !
If you happen to be on a mac, you can use Automator to create custom macros quickly and easily :)
thanks samer for suggestion..
battikh : tell ur sister ano her software ma bifout yibrom bl folders inside the folder ano mush hal2ad sa3beh to do <pf> so u can't keep ur folder structure
but other than this.. it works great
^^ she7adeh w msharta <pf>
I use the standard Windows resizer powertoy when I don't care about quality of results. Select your files, right click, resize, enter resolution. Bam.
Hi, I'm on Mac, and I know (beginner level) how to use Automator, but I don't know how to resize pictures in batch, can you tell me how please? Thanks
Microsoft Office Picture Manager is the fastest way to do the job !
just select the containing the photos. click the thumbnail icon [top left side of the application]
then, edit pictures --> resize
and Done.
As simple as it looks w "Bala Tfelsof chabeb" ;)
Last edited by Yorgi (January 24 2010)
there are two ways that i do it, either i use the microsoft powertoys image resize, or what i preffer to do is use
image magick. it really does amazing stuff beating all and it is fast. here is an example:
for i in `ls $1|grep JPG`; do echo converting $i;convert $1/$i -resize $2% $1/resized/$i;done
i have another one linder that uses more parameters which is more efficient but its on another pc which is not turned on right now so have to check it later and post it...
Hi, I'm on Mac, and I know (beginner level) how to use Automator, but I don't know how to resize pictures in batch, can you tell me how please? Thanks
Drag/drop your items to the workflow, then search for an action called "Scale Images" - the rest should be easy :)
Use Picasa.
I don't believe how I wasted so much time resizing every picture on its own.
I don't believe how I wasted so much time resizing every picture on its own.
Welcome to lebgeeks.
Well I guess the easiest way is to write a for loop in c++ that reads all the images and then resize them. To do that, use a library called CImg.h it is just a header file that you include and that is it.
After that, read all images in the folder and put them in an imageList and then loop the imageList and invoke the function resize on each image then save it.
If you choose to take that path and found problems let me know I can post some code :)
There's also ImageMagick. I am using it right now to resize a set of pictures in hierarchical folders. I just hated C++ Win32 folders and ANSI/UNICODE difference so much that I couldn't take it and went hugging C#. Works like a charm. One thing is for sure, Win32 code is really a dog that Microsoft just hides away behind the pretty .Net interfaces. It's a shame.
Win32 code is really a dog that Microsoft just hides away behind the pretty .Net interfaces. It's a shame.
True.
richy wrote:I don't believe how I wasted so much time resizing every picture on its own.
Welcome to lebgeeks.
I wasted 10 hours figuring out how to resize images I could have done in 2 hours.. - well most of the time was setting up ImageMagick which is hell, but still: welcome to lebgeeks !
Well I guess the easiest way is to write a for loop in c++ that reads all the images and then resize them. To do that, use a library called CImg.h it is just a header file that you include and that is it.
After that, read all images in the folder and put them in an imageList and then loop the imageList and invoke the function resize on each image then save it.If you choose to take that path and found problems let me know I can post some code :)
I would still use a bash script over a C++ code. But still I'm interested. Where do I get CImg.h? Is it a standard library?
Thank you.
richy wrote:I don't believe how I wasted so much time resizing every picture on its own.
Welcome to lebgeeks.