Skip to main content
Known Participant
June 12, 2019
Answered

Photo Collage Toolkit - How to Automatically Scale Images to Cutouts

  • June 12, 2019
  • 2 replies
  • 3964 views

Hello,

I am trying to use JJMacks Photo Collage Toolkit.  I would like to know if there is a way to automatically scale the images to cutouts in the collage templates.  If anyone has accomplished this, please share some advice on how to go about it.  Thank you.

    This topic has been closed for replies.
    Correct answer JJMack

    The scripts in my toolkit will resize your images to fill the image areas in your Collage template they are being populated into.  The image composition in the collage will look like a centered aspect ratio crop that was resized to fill the image area in the collage.  Image that are populated into collage template should have aspect ratios that are close the the Aspect Ratio of the area that they will be places into.  Populating landscape images  into portrait area or a portrait images  into a landscape area will result in image composition that will be unacceptable for to much of you image content will be masked off.  You can populate any size image they will be resized for the collage image area.  However, for best results your Image should have the same Aspect ratio as the area they will be populated into.  They are your images and they are your templates make then work well together..

    2 replies

    JJMack
    Community Expert
    JJMackCommunity ExpertCorrect answer
    Community Expert
    June 13, 2019

    The scripts in my toolkit will resize your images to fill the image areas in your Collage template they are being populated into.  The image composition in the collage will look like a centered aspect ratio crop that was resized to fill the image area in the collage.  Image that are populated into collage template should have aspect ratios that are close the the Aspect Ratio of the area that they will be places into.  Populating landscape images  into portrait area or a portrait images  into a landscape area will result in image composition that will be unacceptable for to much of you image content will be masked off.  You can populate any size image they will be resized for the collage image area.  However, for best results your Image should have the same Aspect ratio as the area they will be populated into.  They are your images and they are your templates make then work well together..

    JJMack
    truematicAuthor
    Known Participant
    June 13, 2019

    Thanks for your reply.  I am moving portrait image on to a portrait cutout, but will further adjust the dimensions to see if I can get the desired resizing.  I also found a script on the forum that might work.  Will try it out in the next few days and report back.

    truematicAuthor
    Known Participant
    June 14, 2019

    My scripts use place and place can degrade images if you are not careful.  If your image files do not have a Print DPI Resolution that you Template has  Place will scale you image which will degrade their quality.  That is how Adobe Programmed Photoshop Place feature. Do not ask me why they did that.  They don't scale when you use copy and paste between documents.  or  Drag and Drop  of layers between document or duplicate layers from one document to an other.  Only place scaled  based on the two resolutions. IMO Adobe should not do this.

    As for Aspect Ratio  Alpha channels are like a selections. Selections have a rectangular selection bounds. The max width and the max height  width:height.  A image has a rectangular Canvas width:height.    So an image has a width:height Aspect Ratio as do the collages image location.   If they have the same aspect ratio the resize will be perfect no image content will be lost.   If the Aspect  Ratios are not the same the image resize will be done to fill the collages imag are the width or the height will be a  perfect fit.   However the resized image other dimension will be larger then the Collage's Image location.  So the Image is masked with the Collage's Alpha channel selection.  The image will have the size and shape of you collages image alpga channel need not be a rectangle.  No actual cropping is done.

    There your images you create them the with some aspect ratio the  Collages templates you create you create the image locations Alpha Channels.    If the alpha channel Selection bounds matches your image file canvases aspect ratio the resize will be perfect.  The only problem I know users have had with image sizes some users used PNG file that have Transparent Boarders and the  expected these boarders to be in the resized collage's Images.  The Problem is Place Trims off transparent borders so  would copy paste the transparent borders would not be in the clipboard.   The only solution is to remove the transparent boarders without actually removing the transparent boarders by simply adding two 1% opacity pixels. One in the top left corner and one in the bottom right corner of the canvas in the PNG.  No one will ever see these two pixels.

    All the scripts do is resize your image to fill the collage images area and masked the Image to your image area shape.   You control all Aspect Ratio.


    JJMack  wrote

    There your images you create them the with some aspect ratio the  Collages templates you create you create the image locations Alpha Channels.

    Thank you for providing these useful scripts and for your helpful advice.  This was my last resort, which you reiterated with your suggestion.  To make this work for my use case, I will need to resize the images with canvases that are all the same ratio first and then this should work perfectly.  Thanks again, and wish you good health and many blessings!

    Sahil.Chawla
    Adobe Employee
    Adobe Employee
    June 12, 2019

    Hi there,

    I am looping in JJMack, as he might be able to you out with this query.

    Regards,
    Sahil

    truematicAuthor
    Known Participant
    June 12, 2019

    Thank you for the pointer!  Hope he chimes in...