Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2005
    Location
    Ontario, Canada
    Posts
    1,750

    Question How to make a script?

    I need to make 10,000 jpg images with a white background and black text.
    Each image is 200x200 px
    The text in each image should be centered and contain the the image number. so for example image482.jpg would be a white square with black "482" centred on the image.

    Can someone explain how I can make a script in Photoshop that can create all these images for me? Is photoshop even able to do this or should I use a different tool? I'm using CS4
    C++, 3D OpenGL and Game Programming video tutorials:
    www.MarekKnows.com
    Play my free games: Ghost Toast, Zing, Jewel Thief

  2. #2
    Join Date
    Dec 2003
    Location
    3dbuzzmania
    Posts
    4,064
    Create your base image.
    Record an action that copies your image and saves as a new file in same folder.
    Run the batch process on all files in that directory.
    It will be not as nice as executing right off the bat 10,000 times, but it will grow exponentially, 2^n, it won't take that long to hit 10,000, you'd have to run it about 13 times to hit over 10,000. I can't try this theory right now as I am at work. Worth a shot...

  3. #3
    Join Date
    Mar 2005
    Location
    Ontario, Canada
    Posts
    1,750
    I don't see how that would change the text shown in each image to correspond to the file number.

    I couldn't figure out how to do what I wanted with photoshop so I solved this problem using http://jpgraph.net/
    C++, 3D OpenGL and Game Programming video tutorials:
    www.MarekKnows.com
    Play my free games: Ghost Toast, Zing, Jewel Thief

  4. #4
    Join Date
    Dec 2003
    Location
    3dbuzzmania
    Posts
    4,064
    Sorry Marek I missed that part when I read it the first time. Meh.

  5. #5
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,812
    Heh - I was gonna suggest using excel...

    In A0 put 1
    In A1 put =A0 + 1
    copy A1
    select A2 - A10000 and paste.
    set up the print area to print one cell per page

    print it to file (instead of to your printer) as images

    DONE!

    btw, I know you already sorted it but I was enjoying working that out!

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  6. #6
    Join Date
    May 2008
    Location
    ubiquitous
    Posts
    794
    Photoshop can do it, but you will need to program a task like that with one of the scripting languages PS uses rather than recording an action. It could also be done with PHP as well.

Tags for this Thread

Posting Permissions

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