Cannonfodder Posted May 17, 2003 Report Share Posted May 17, 2003 I'm scanning in 4 photos at a time and was wondering if anyone knew of a script for isolating each image and opening it up in a new window.. There's a lot of photos! Quote Link to comment Share on other sites More sharing options...
scoopy Posted May 17, 2003 Report Share Posted May 17, 2003 I don't think this is gonna be possible, but then I suk with the gimp. I would think one scan qualifies as one image/file, regardless and would have to be separated manually. Thinking in my photoshop ways, you would have to use the select tool and copy/paste into new image (which works with gimp too). Then again, this is Linux and we do have people like aru :D Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted May 17, 2003 Author Report Share Posted May 17, 2003 That's pretty much what I'm doing. Select/Copy/New/Paste. The select stage has to have some cropping in to avoid white borders from crooked photos :) Actually I'm now doing 2 at a time.. Quote Link to comment Share on other sites More sharing options...
aru Posted May 17, 2003 Report Share Posted May 17, 2003 Then again, this is Linux and we do have people like aru :D hehehe, thanks :D But in this case I believe I'm completely unuseful: I have a cannon scanner that I don't use under linux (well, I don't use it at all) I have little expericence with gimp ...And I know almost nothing of perl which is (if I'm not wrong) the scripting language of gimp... or was it lisp... no idea :P Said that, I'm sure there should be an script outhere for doing what you want. Quote Link to comment Share on other sites More sharing options...
aru Posted May 17, 2003 Report Share Posted May 17, 2003 Not exactly what you want, but if all the scaned images contain two photos at the same postion, you can do: for image in *; do convert -crop 354x240+0+0 "$image" "${image%.*}_TOP.${image##*.}" convert -crop 354x240+0-0 "$image" "${image%.*}_BOTTOM.${image##*.}" done That will create an image_TOP.ext with the photo on the top of the scanned image, and an image_BOTTOM.ext with the photo on the bottom of the scanned image. I'm assuming that the photos are 354x240 sized (I don't know the real value of your images, or of any photo :P). Also I'm assuming that the top photo is placed at the very left top (+0+0) and the bottom photo is placed at the very left bottom (+0-0). Take a look to man: X, ImageMagick, convert,... Maybe there you'll find exactly what you want. HTH :D Quote Link to comment Share on other sites More sharing options...
aru Posted May 17, 2003 Report Share Posted May 17, 2003 convert -crop 354x240+0-0 "$image" "${image%.*}_BOTTOM.${image##*.}" I wrote the above message w/o testing it, and after sometests, I've realized that negative offsets doesn't work (despite of what the man page says), so in case your bottom photo is placed at left+bottom, you need to provide the number of pixels from the very top to the beggining of the photo, as: convert -crop 354x240+0+500 "$image" "${image%.*}_BOTTOM.${image##*.}" (assuming that the bottom photo starts at 500 pixels from the top) Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted May 17, 2003 Author Report Share Posted May 17, 2003 I think I'm going to have to stick to manual work. I do not want white borders anywhere but its too easy to have a crooked photo or what not. Thanks for the replies though... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.