combining two images into one


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting combining two images into one
# 1  
Old 08-02-2012
combining two images into one

Hi,
I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the two images into one image file (i.e. one file with the two A images).

The code that I have been working with is indicated below but the problem is that I cannot get it to work. Maybe there is an alternative way of doing this.

Code:
for f in *.cdt; do var=`echo "$f" | sed 's/\.cdt$//'`; convert +append $var.cdt.png $var.matrix.png $var_merged.png; done

Any help would be great SmilieSmilieSmilieSmilieSmilieSmilieSmilieSmilieSmilie
# 2  
Old 08-02-2012
Original thread here.

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Script to find/sort/move images/duplicate images from USB drive

Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
Discussion started by: JonaQuinn
1 Replies

2. Solaris

Solaris 8 02/04 CD images

Hi all friends of the Forum, i want to ask you if someone would be so kind to provide me the links for Solaris 8 02/04 CD images.. (I can't find them in the Net, maybe my google-fu is weak) (Also i don't have an Oracle Solaris support contract so i can't download them from their site) ... (0 Replies)
Discussion started by: mk2soldier
0 Replies

3. Shell Programming and Scripting

resize images

Is there a script or extension that I can look into that will re-size an allotment of images to a given size?? Id like to take images of a certain size and resize them but Im dont remember an install option that can do it if installed in ubuntu but I, also unsure in what code I will have to learn.... (2 Replies)
Discussion started by: graphicsman
2 Replies

4. Shell Programming and Scripting

putting two images together

Hi, I generated many figures in .png format (approximately 120). Right now I need to pair the figures on a single page so that the files with the same file name (i.e. jack) that end with .matrix.png are placed on the left and .cdt.png is on the right (so jack.matrix.png with jack.cdt.png... (6 Replies)
Discussion started by: kylle345
6 Replies

5. UNIX for Dummies Questions & Answers

Not Sure How to Look for Not Used Images On the Server

Hello All: I a website with over 1800 pages in all HTML and I am trying to figure out, what is the best way for me to see when the image files were last accessed. Reason being, I am sure I have images in there that were not deleted when a page was taken offline or whatever and I would like... (3 Replies)
Discussion started by: pmsquillace
3 Replies

6. Web Development

images are not visible

hi, why my uploaded images are not visible both in front-end and back-end of my CMS ? See the picture: http://dl-client.getdropbox.com/u/72686/noPics.png I checked the GD library in php. It seems ok... http://dl.getdropbox.com/u/72686/GD.png thanks ---------- Post updated at... (0 Replies)
Discussion started by: aneuryzma
0 Replies

7. Solaris

solaris 8 images

I need a set of CD's for solaris 8 , but for THE PC. if someone could direct where to either download them or share them with me, that would be great. I need to repair a system here for legacy purposes. (2 Replies)
Discussion started by: frankkahle
2 Replies

8. Solaris

Flar Images

I once found a document on the web describing how to build partition flar images instead of having just the one large one. I have managed this but am having problems extracting the subsequent flar archives. I ahve built the system from a jumpstart server and now need to add the program images etc... (0 Replies)
Discussion started by: 58fairlane
0 Replies

9. AIX

where to get .bm or .pm images

I'm just trying to get a personal picture for a backdrop on my AIX user account at work. Where does one acquire the .bm or .pm files. How do I create them as an unpriveledged user? There are quite a few jpeg's that I would like to use. (0 Replies)
Discussion started by: trigggl
0 Replies
Login or Register to Ask a Question