Multiply Image by 6 and export
Multiply Image by 6 and export
Hello Imagemagick professionals,
I need to convert images of winebottles. I have a jpg image of the bottles, all same height but different width (according to the bottlesize).
The image of the bottle has to be resized, multiplied by 6 (or 3) and pasted in a new image of a rectangular size (e.g. 1000 x 1000). So the original image contains one bottle, the resulting image contains 6 (or 3) similar bottles of the original.
I need a script, that converts every image in a specific folder with this procedure.
Can somebody provide help with that? Offers for that would be very appreciated. /* To the admins - I am willing to pay for it */
Thanks in advance and kind regards
Bernd
I need to convert images of winebottles. I have a jpg image of the bottles, all same height but different width (according to the bottlesize).
The image of the bottle has to be resized, multiplied by 6 (or 3) and pasted in a new image of a rectangular size (e.g. 1000 x 1000). So the original image contains one bottle, the resulting image contains 6 (or 3) similar bottles of the original.
I need a script, that converts every image in a specific folder with this procedure.
Can somebody provide help with that? Offers for that would be very appreciated. /* To the admins - I am willing to pay for it */
Thanks in advance and kind regards
Bernd
Last edited by berndh70 on 2019-07-26T09:14:45-07:00, edited 2 times in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Multiply Image by 6 and export
What version of IM, on what platform?
You need to resize, but to what size? The same size for all images, or is there some rule for the new size?
Perhaps sample input and output images would help.
You need to resize, but to what size? The same size for all images, or is there some rule for the new size?
Perhaps sample input and output images would help.
snibgo's IM pages: im.snibgo.com
Re: Multiply Image by 6 and export
Hi snibgo,
thanks for the reply. I installed the program today via Homebrew on a Mac, so I guess it's the current version, but I am not familiar with the software at all. I am just a "normal" user with little command line knowledge.
The pictures all have the same height of 800px. The width is different depending on the bottle.
Example for 6 bottles:
Original file wine1:
Result file wine1:
Original file wine2:
Result file wine2:
Example for 3 bottles:
Result wine2:
A process should look something like this:
numberOfBottles=6
canvasSize=1000
1. open the original file
2. scale it to [canvasSize/numberOfBottles] width (=166px)
3. generate a canvas of [canvasSizexcanvasSize] (=1000x1000px)
4. paste [numberOfBottles] in one line on the canvas
5. save resulting picture under filename [numberOfBottles]+"x"+originalFilname.jpg in a designated folder
This process should apply to all pictures in a specific folder. A script for another number of bottles should do the same accordingly. I basically need this script for 3 and 6 bottles.
Hope I could clarify a little. Please don't hesitate to ask any questions or if everything is clear send me an offer. I would prefer to pay via Paypal.
Thanks in advance
Bernd
thanks for the reply. I installed the program today via Homebrew on a Mac, so I guess it's the current version, but I am not familiar with the software at all. I am just a "normal" user with little command line knowledge.
The pictures all have the same height of 800px. The width is different depending on the bottle.
Example for 6 bottles:
Original file wine1:
Result file wine1:
Original file wine2:
Result file wine2:
Example for 3 bottles:
Result wine2:
A process should look something like this:
numberOfBottles=6
canvasSize=1000
1. open the original file
2. scale it to [canvasSize/numberOfBottles] width (=166px)
3. generate a canvas of [canvasSizexcanvasSize] (=1000x1000px)
4. paste [numberOfBottles] in one line on the canvas
5. save resulting picture under filename [numberOfBottles]+"x"+originalFilname.jpg in a designated folder
This process should apply to all pictures in a specific folder. A script for another number of bottles should do the same accordingly. I basically need this script for 3 and 6 bottles.
Hope I could clarify a little. Please don't hesitate to ask any questions or if everything is clear send me an offer. I would prefer to pay via Paypal.
Thanks in advance
Bernd
Last edited by berndh70 on 2019-07-26T23:00:00-07:00, edited 1 time in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Multiply Image by 6 and export
I'll leave this for Fred or anyone else.berndh70 wrote:... via Homebrew on a Mac
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiply Image by 6 and export
What version of ImageMagick did you install?
On IM6 on command line type
On IM7 type
On IM6 on command line type
Code: Select all
convert -version
Code: Select all
magick -version
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiply Image by 6 and export
How much space should be put between the bottles? Can you quantify that in percent of width of the image or pixels? Or should it just use whatever space you provide.
The simple command would be something like
I have to go out for a while but I will work on this later today. I presume you want a shell script or do you need an AppleScript?
The simple command would be something like
Code: Select all
number=6
dups=$((number-1))
file="image.jpg"
convert "$file" -duplicate $dups +append -resize 1000x1000 -background white -gravity center -extent 1000x1000 "${output_directory}/${number}x${file}"
Re: Multiply Image by 6 and export
Version: ImageMagick 7.0.8-56 Q16 x86_64 2019-07-24 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(3.1)
Delegates (built-in): bzlib freetype heic jng jp2 jpeg lcms ltdl lzma openexr png tiff webp xml zlib
And I think a shell script is fine. You just have to explain me the proper excecution
And thanks for helping!
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(3.1)
Delegates (built-in): bzlib freetype heic jng jp2 jpeg lcms ltdl lzma openexr png tiff webp xml zlib
And I think a shell script is fine. You just have to explain me the proper excecution
And thanks for helping!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiply Image by 6 and export
Please send me private mail on this system with your actual email address so that I may contact you directly and send the script. No charge, since I think it is very simple.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiply Image by 6 and export
Are all the input images JPG? If not, what other formats does the script have to process?
Re: Multiply Image by 6 and export
Sent you a message on the board.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiply Image by 6 and export
I receive no new messages from you since this morning. Are you sure you sent it?