+ Reply to Thread
Results 1 to 4 of 4

Resize all photos in a sub folder + add watermark

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Resize all photos in a sub folder + add watermark

    I am trying to build a script with will use Scripting.FileSystemObject that will do the following:

    1. Resize all photos in a sub folder .
    2. Add a watermark that is saved on my local computer to each photo.


    Was not able to find any solution online for any of the scripts.

    Do you have any recommendations?
    Thank you.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Resize all photos in a sub folder + add watermark

    Not an Excel VBA question, not really. You need a photo image editing tool to do this.

    I know and use a free tool called IrfanView, have used it for years.

    This pic converter is free, powerful, and has a BATCH CONVERSION tool with ADVANCED OPTIONS that include adding a watermark.

    Check it out, should be all you need for this particular task.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Resize all photos in a sub folder + add watermark

    Although it could be handled more efficiently using other tools, I often find that on restrictive client networks vba is the only means of running my own executable code to do stuff like this, so this is an Excel way.

    The attached zip file contains a xlsm file, and 2 subfolders where input and output images are stored. I have included 7 tiny jpg files for illustration purposes.

    ResizeImages.zip

    • Copy the top-level folder in this zip file to your working folder so that it creates the subfolders and images as well.
    • Open the newly copied xlsm file.
    • Imported images are sized to fit the shape and size of cell B5, so resize this as you require.
    • Change the image in the little picture box to your watermark image (I used a PNG file with transparent background).
    • Drag and position this watermark picture where you need it inside of cell B5.
    • When run, the Input subfolder is searched for jpg files and processes them when found, saving the converted files to the output folder.
    • My test images are quite small, so in this instance, the macro is actually enlarging the picture.

    Some tweaking is required, eg. getting rid of the edge artifacts on the output images, but this should give you a good starting point. I also didn't bother with FileSystemObject.

    The converter procedure:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Resize all photos in a sub folder + add watermark

    Thank you for your help I will look into it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. resize, insert, and arrange multiple photos
    By opusarlo in forum Excel General
    Replies: 1
    Last Post: 02-18-2015, 05:50 PM
  2. create new folder at one location and copy photos in that folder from other location
    By meer_ali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2014, 05:20 AM
  3. new folder creation and moving of photos into that created folder on different drive
    By meer_ali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2014, 02:29 AM
  4. VBA Insert all Photos from folder - photos not lined up w/ cell borders in older versions
    By jaimelwilson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2014, 02:26 PM
  5. Vlookup to Insert photos compiled in a Folder to en Excel file
    By aleifer12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2012, 12:27 PM
  6. Vlookup to Insert photos compiled in a Folder to en Excel file
    By aleifer12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2012, 11:59 AM
  7. Resize and insert multiple photos
    By latausm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2011, 11:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1