Site
Home / Forum / Artwork / Using Photoshop to Automate

Using Photoshop to Automate


Posted: 10 Mar 2020 18:16

curswine
Posts: 143
Joined: Jan 2017

I'm gonna need feedback on this as I haven't written a guide or tutorial in a long time.

So what I'm aiming to do is setup a .PSD file in Photoshop that will use a .CSV file to produce thumbnails of all fixtures in a league or cup competition.

What You'll Need
[list][*]Adobe Photoshop 7 or newer.
[*]Google Sheets (Although any spreadsheet software should work.)
[*]An advanced text editor (I use Notepad++ (Optional))[/list]

Method
[list]Open Photoshop
[list][*]Start off by creating a new .PSD file in Photoshop and make it 1280x720.
[*]Design your fixture layout however you want to, mine looks like this to start off with. [url=https://i.imgur.com/PSUBrPZ.jpg]My base looked like this.[/url]
[*]Once you're happy with how it looks, click on the 'Rectangle tool' and drag out a shape where you wish your home team logo to be, also note that this will define how large your logo will appear on your finished design.
[*][url=https://i.imgur.com/GH5xlwj.jpg]Here I have chosen to make a 278x278 square and then duplicated it and put the second square where I want my away team logo to appear.[/url]
[*]Name these layers something obvious as if you don't things may get confusing later. I have named mine 'Home Team Logo' and 'Away Team Logo' respectively.
[*]Make a text layer named 'Filename', this doesn't have to show on the image, it can be a hidden layer.
[*]Save the .PSD in a folder with the logos that you're going to be using to display as fixtures.[/list]

Google Sheets
[list][*]Open a new sheet and name it however you like.
[*]You're now going to have to create your fixtures, this could be done in a number of ways depending on your familiarity with spreadsheet software.
[*]My method here was to create two columns, the first one. which I named Home_Logo displayed [url=https://i.imgur.com/N9fDrRK.jpg]111111222222333333444444555555666666, and the second which I called Away_Logo showed 123456123456123456123456123456123456[/url]. I then deleted all the entries where the two values were the same since a team cannot play itself. I then sorted the first column so that there were no blank rows.
[*]Using Find and Replace (Ctrl+H) I then substituted the numbers for the logo filename; for example 1 as replaced with Banga.png, 2 with Kauno.png etc.
[*]I also made sure to add a column called 'Filename' which is what Photoshop will use to name files. I used the two team names separated by an underscore as my filenames: Banga_Kauno. [url=https://i.imgur.com/al4TPmJ.jpg]Here's how mine looked.[/url]
[*]Now it's time to save your file as a .CSV, make sure to save it to the same folder as your .PSD where your logos are located. [url=https://i.imgur.com/eYe6RpD.jpg]Your folder should look a bit like this.[/url][/list]

Back in Photoshop
[list][*]Now to link the ,CSV to the .PSD. With your file open navigate to 'Image > Variables > Define...'
[*]In the 'Layer' drop down box find your layer that you named 'Home Team Logo' earlier.
[*]Tick the 'Pixel Replacement' checkbox and in the 'Name' field type in 'Home_Logo' or whatever you named the column in your .CSV file.
[*]Now once that is done navigate again to the 'Layer' drop down box and find the layer named 'Away Team Logo'.
[*]Again tick the 'Pixel Replacement' checkbox and in the 'Name' field type 'Away_Logo'.
[*]Finally find your 'Filename' layer, click the 'Text Replacement' box, and type in 'Filename'.
[*]If you've done this correctly each layer should now have an asterisk (*) next to their name in the drop down box. [url=https://i.imgur.com/jd7MuxL.jpg]It should look something like this.[/url]
[*]Next click on the drop drown box which says 'Define' and click on 'Data Sets'. Alternatively click on 'Prev' or 'Next', they all lead to the same place.
[*]In the 'Data Sets' screen click on the button which says 'Import...' and then navigate to where your .CSV file is saved. Also make sure the two check boxes in this window are ticked. Click 'OK'.
[*]If everything has gone to plan you should now be able to view all your fixtures with the [url=https://i.imgur.com/1p2vNcj.jpg]logos instead of the squares[/url], click through them all to make sure that they work, if not it is best to check that filenames are correct. You may also receive error messages at this stage.[/list]

Saving in Photoshop
[list][*]Once you're happy with everything it's time for saving. Go to 'File > Export > Data Sets as Files...'.
[*]This will bring up a menu for you to select where you wish to save your files to and how you wish to name them, if you included a 'Filename' column they should automatically be named this. If not, play around with the options till you get a filename format you're comfortable with.
[*]Unfortunately there is no way to export the files directly as .JPG files, so they must first be saved as individual .PSD files , so it's best to make your original .PSD file as light as possible before exporting.
[*]Once you've picked a location for your files to be saved and clicked 'OK' to export your files, navigate to 'File > Scripts > Image Processor...'.
[*]In the first section of the 'Image Processor' window navigate to your folder full of newly created .PSD files.
[*]In the second section I choose 'Save in Same Location', Photoshop will automatically create a 'JPEG' folder.
[*]In the third section choose a file quality, 12 is best, here you can also resize the images if you so wish.
[*]Click 'Run' and Photoshop will begin to process all the images into .JPG files. The end result [url=https://i.imgur.com/a6NQYMD.jpg]https://i.imgur.com/a6NQYMD.jpg[/url][/list]

Notes
[list][*]This is probably the simplest method there is, of course it can be made more complicated by whatever different design features you wish to include like team names, event times, round names, country flags etc. These would involve adding more columns into the .CSV file and pointing the .PSD to the right location for the information.
[*]If you're using diacritics in text ÁáÉéÍíÓóÚú etc. Make sure to open the CSV in the text editor first and convert it to ANSI coding, if you don't do this it is likely that the letters will not display correctly in Photoshop.[/list][/list]

Please let me know if you have any problems or errors and I'll do my best to help you with them.

Posted: 10 Mar 2020 19:24

ovokx
Posts: 830
Joined: Jan 2017

Thanks for your effort on this guide! I'll check it this weekend and let you know if everything works!

Posted: 10 Mar 2020 19:44

zag
Posts: 1,558
Joined: Oct 2016

Great I will also try this at some point! nice guide for sure.

Posted: 14 Jun 2020 10:14

curswine
Posts: 143
Joined: Jan 2017

Yesterday I generated thumbnails for all the fixtures of the JLeague (revised fixtures should be released tomorrow).

I just wanted to share the files in case people were a bit confused by the tutorial and wanted to see the method in action for themselves.



Posted: 14 Jun 2020 10:52

ovokx
Posts: 830
Joined: Jan 2017

Cool, but I think that we should keep same current design for soccer for all leagues. If you want to test it, here you can download the version I'm currently using for german leagues. I have a different PSD for each country I'm uploading thumbs in order to save time while creating thumbs for domestic league and domestic cups:

https://mega.nz/file/UoQDQYJY#U3I6toMaV ... 4Xho6-kDRE




Posted: 14 Jun 2020 11:14

zag
Posts: 1,558
Joined: Oct 2016

I actually don't mind different designs, I like the variety in different leagues.

EDIT: Uploaded both sources to: https://github.com/zag2me/TheSportsDB

Posted: 17 Jun 2020 13:14

zag
Posts: 3,327
Joined: 2020-03-23

We are missing a few posts from this thread in the migration, please post again if it was important

Posted: 17 Jun 2020 13:24
curswine
Posts: 865
Joined: 2020-06-17

The whole tutorial looks to be gone as well as the posts that proceeded it.

Posted: 17 Jun 2020 13:41

zag
Posts: 3,327
Joined: 2020-03-23

Its there, just edit the 1st post. probably a bbcode thing!

Posted: 17 Jun 2020 14:00
curswine
Posts: 865
Joined: 2020-06-17

Its there, just edit the 1st post. probably a bbcode thing!

I see it. Does standard markup still work?

Posted: 18 Jun 2020 11:41

zag
Posts: 3,327
Joined: 2020-03-23

its there, just edit the 1st post. probably a bbcode thing!

I see it. Does standard markup still work?


Its supposed to yes but there are probably some bugs somewhere. I'd advise keeping the bbcode simple for now as its not a massive priority to fix and I literally hate regex expressions

Posted: 28 Jun 2020 14:29
curswine
Posts: 865
Joined: 2020-06-17

I've just created a template for the Russian League basically using their style for thumbnails from their YouTube page.




Posted: 28 Jun 2020 14:43

Ovokx
Posts: 1,697
Joined: 2020-06-17

Love it!!!!!

Posted: 24 Aug 2020 16:26

Ovokx
Posts: 1,697
Joined: 2020-06-17

Here you can see an easy to follow video explaining the method by curswine to create thumbs by using "Variables" on PS:

https://www.youtube.com/watch?v=Acjn7HoqrJ8&list=FL67XTWiQyOjY6qrK6eHgaKQ&index=2&t=0s



Posted: 24 Aug 2020 18:02
curswine
Posts: 865
Joined: 2020-06-17

Here you can see an easy to follow video explaining the method by curswine to create thumbs by using "Variables" on PS:

https://www.youtube.com/watch?v=Acjn7HoqrJ8&list=FL67XTWiQyOjY6qrK6eHgaKQ&index=2&t=0s



I just had a quick scan through the video, and it seems to perfectly fit what I'm trying to get across, good find!

Posted: 24 Aug 2020 18:37

zag
Posts: 3,327
Joined: 2020-03-23

Awesome video, Photoshop seems very powerful! Might have to put down my beloved GIMP for a little trial

Posted: 30 Aug 2020 14:39
cydalby
Posts: 335
Joined: 2020-06-16

Loving the ligue 1 posters!

Ovokx
Posted: 30 Aug 2020 14:53

Ovokx
Posts: 1,697
Joined: 2020-06-17

Loving the ligue 1 posters!

TY! I'll try to replicate league looks as with the last design it was not easy to quickly identify the competition


Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 18 (Total: 18)