Composite Transparent DVD Case over Movie Poster

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
(''')d[-_-]b(''')
Posts: 2
Joined: 2015-12-24T02:36:15-07:00
Authentication code: 1151

Composite Transparent DVD Case over Movie Poster

Post by (''')d[-_-]b(''') »

Hello,

Noob here, needing assistance please...

I downloaded a few thousand movie posters that are either 480x720 or 720x1080 and would like to overlay a DVD case then upload them all as 512x512 ICO files.

I have been struggling and cant figure out the right command.

Original Poster
Image

Overlay PNG
Image

Desired result make with other app = Image 3
Image

I would also like to slightly round the edges of the poster.

Please help.
Last edited by (''')d[-_-]b(''') on 2015-12-30T01:19:30-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Composite Transparent DVD Case over Movie Poster for deviantart

Post by fmw42 »

Looks like you have managed to do so. What is wrong with your result above? What is your IM version and platform?

See http://www.imagemagick.org/Usage/thumbnails/#rounded
http://www.imagemagick.org/Usage/compose/
http://www.imagemagick.org/Usage/layers/#convert
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Composite Transparent DVD Case over Movie Poster

Post by Bonzo »

Desired result make with other app = Image 3
The text above the images.

What code do you have so far?
As fmw42 says: What platform and version of Imagemagick are you using?
(''')d[-_-]b(''')
Posts: 2
Joined: 2015-12-24T02:36:15-07:00
Authentication code: 1151

Re: Composite Transparent DVD Case over Movie Poster

Post by (''')d[-_-]b(''') »

Hi,

I figured it out.. although it could be better.
Oh.. Windows with ImageMagick-6.9.2-Q16-HDRI

Code: Select all

@echo off
setlocal enabledelayedexpansion
SET "@SOURCE=X:\Movie Posters\"
SET "@LOCATION_OF_CASE=X:\moviecase.png"
SET "@FILENAME=Poster.jpg"
SET "@ICON_OUTPUT=Case.png"
SET "@PERCENTAGE=60%"

for /r  "%@SOURCE%\" %%a in (.) do (
  pushd %%a
  if exist %@FILENAME% (
   echo f | convert -resize 370x480 -page +9+5 -alpha set -virtual-pixel transparent -channel A -blur 0x8 -threshold %@PERCENTAGE%%% "%@FILENAME%" -background none -page -96-8 "%@LOCATION_OF_CASE%" -layers merge "%@PNG_OUTPUT%"
    ) 
  popd 
  ) 
There are some images that are wider that needed...

How do I reduce the height of %@PNG_OUTPUT% and let ImageMagick automatically reduce the width in order to keep the same dimensions / shape as %@FILENAME%?
Post Reply