Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Extension Database Generic Extensions Game Media Processor

Game Media Processor
azuravian
Offline

#1
01-22-2021, 10:06 PM (This post was last modified: 06-02-2021, 11:36 PM by azuravian. Edit Reason: new update )
Resize Images | Resize your icons, covers, and backgrounds to take up less space

Description


This tool was inspired (and partly copied from) darklinkpower's Game Media Tools and Image Cache Size Saver.

It will allow you to select an image type (icon/cover/background), and specify the maximum width and height for the images.

It requires the use of ImageMagick in order to resize the images.  ImageMagick can be downloaded here (See the "Windows Binary Release" section): [url=ImageMagick can be downloaded here (See the "Windows Binary Release" section): https://imagemagick.org/script/download....wnload.php[/url].

Github Repository: https://github.com/azuravian/playnite-ga...aprocessor

Installation

1. Download the latest Resize_Images*.pext extension file from the Download section

2. Drag and drop it to the Playnite main window to install.

Usage

1. Open the main menu and select the "Resize Images" function.

2. In the first time usage, you'll be asked to select the ImageMagick executable if you are not using the installed version. This is only required once since the location will be saved for subsequent uses.

After all the images have been processed you will be presented with the results.


Screenshots

Menu:

[Image: zTleDwT.png]


Options:

[Image: smE7g5x.png]


When finished, you will receive a message similar to the following:

[Image: DgbHn9y.png]


Example

Cover before resizing:

[Image: 1UU0IXh.png]


Cover after resizing:

[Image: E0I1yLl.png]


Changelog

v1.0 
  • Initial Release
v1.1
  • Added new options and ability to revert images back to their original.
  • New Options include, Resize and Crop, Grayscale, and Colorshift
v1.15
  • Changed resize to allow option to NOT preserve aspect ratio.
v1.2
  • Added option to flip images.
  • Updated file location for restoration to be per option.
v1.3
  • Added option to fade edges of images.
v1.5
  • Added logo as a media type.  To use this, you must have the ExtraMetadata extension installed.
  • Added capability to resize images to a larger size.  The box to "only shrink" is checked by default.  If you uncheck this box, then the images will still be processed even if the width and height are both larger than the current image.
v.1.5.1
  • Fixed error that occurred when the user's Playnite is set to a portable installation.
v.1.6
  • Added new trim function to automatically remove any border from the image. There is a checkbox (default: checked) that will only remove the border if it is transparent. I use this to remove the transparent padding on a lot of logos that are downloaded.

v1.6.1
  • Fixes error when trying to trim an image that has a grayscale colorspace instead of RGB.
v1.8
  • Name changed to "Game Media Processor"
  • Location changed to be a subitem of "Game Media Tools" called "Open Media Processor"
  • Added option to delete all images in the backup cache.
  • Added checkbox at the top to process images without creating a backup.  Warning: using this option will prevent you from reverting any changes if a mistake is made.
v1.8.1
  • Fixed issue with not finding backup folder due to name change.
v1.8.2
  • Fixed error on Trim function for some images.

Download


.pext   Game_Media_Processor_1_8_2.pext (Size: 11.54 KB / Downloads: 301)

.pext   Game_Media_Processor_1_8_1.pext (Size: 11.52 KB / Downloads: 277)

.pext   Game_Media_Processor_1_8.pext (Size: 11.44 KB / Downloads: 144)

.pext   Resize_Images_1_6_1.pext (Size: 10.95 KB / Downloads: 218)

.pext   Resize_Images_1_6.pext (Size: 10.94 KB / Downloads: 145)

.pext   Resize_Images_1_5_1.pext (Size: 10.69 KB / Downloads: 170)

.pext   Resize_Images_1_5.pext (Size: 10.81 KB / Downloads: 172)

.pext   Resize_Images_1_3.pext (Size: 10.56 KB / Downloads: 197)

.pext   Resize_Images_1_2.pext (Size: 10.25 KB / Downloads: 146)

.pext   Resize_Images_1_15.pext (Size: 10.11 KB / Downloads: 168)

.pext   Resize_Images_1_1.pext (Size: 10.04 KB / Downloads: 165)

.pext   Resize_Images_1_0.pext (Size: 8.43 KB / Downloads: 180)



NOTE, as this is new and I am NOT a developer, I would recommend backing up your Playnite files before use.
hunt363
Offline

#2
01-23-2021, 04:45 AM
Thank you for this! A lot of the time I have to manually resize game covers and backgrounds to preserve resources, this is gonna save a lot of time and work.
azuravian
Offline

#3
01-23-2021, 07:25 AM
(01-23-2021, 04:45 AM)hunt363 Wrote: Thank you for this! A lot of the time I have to manually resize game covers and backgrounds to preserve resources, this is gonna save a lot of time and work.

That's exactly why I made it.  I had used darklinkpower's Game Media Tools and found I had over 2000 images that I needed to reduce in size.
DonkeyOatay
Offline

#4
01-26-2021, 12:21 PM (This post was last modified: 01-26-2021, 12:21 PM by DonkeyOatay.)
Is there any chance you can add the option to not keep the aspect ratio when resizing? Reason I ask is that I sometimes cannot find square icons for games but can find ones that are close to square but then have to resize them or crop them in paint (or equivalent), where using your extension would obviously make it far easier.
azuravian
Offline

#5
01-27-2021, 11:05 PM
Updated to 1.1

3 new options added:
  • Resize and Crop - resizes the image and crops it to the desired aspect ratio.
  • Grayscale - converts image to grayscale
  • Colorshift - changes hue of image
Resize and Crop

This option allows you to enter the desired width and height, along with the gravity for the crop.  Gravity can be a bit confusing, but is easy once you understand it.  It defaults to "Center", but can take any of the following entries:
  • Northwest
  • North
  • Northeast
  • East
  • Southeast
  • South
  • Southwest
  • West
  • Center
Each of these represents the direction from which the image portion will remain when cropped.  For example, if you select Northwest, the portions of the image to be cropped will be from the bottom and right sides of the image, keeping everything from the top and left sides of the image.

Examples:

1. Using south:

Before
   

Options
   

After
   

2. Using West

Before
   

Options
   

After
   

3. Using Center

Before
   

Options
   

After
   

Grayscale

This option is fairly self-explanatory and takes no entry.  It converts the image to grayscale.


Colorshift

This option shifts the hue of the color around a hue colorwheel, like the one below, using an angle from 0 to 360:

   

Where this might get confusing is that the shift is a rotation around the wheel from the original color(s), not from 0.  So a number close to 0 or 360 will result in an image similar to the original, while a number between 40 and 320 will be a more pronounced change.

Examples:

Starting Image
   

1. Colorshift 30
   

2. Colorshift 120
   

New pext added to original post.
DonkeyOatay
Offline

#6
01-28-2021, 05:10 PM
Thanks a lot for the extra options, which are a great help.

I think it would still be great to have the option to compress an image into a certain size without cropping it, for when you have an image which isn't quite at the right dimensions (but is close) and where you can't crop anything out for one reason or another - if it's just a small difference in ratio it won't look too bad, especially when we're talking about a smaller image like an icon.

Appreciate it's a fairly niche thing though Smile
azuravian
Offline

#7
01-28-2021, 05:17 PM
(01-28-2021, 05:10 PM)Donkeyfumbler Wrote: Thanks a lot for the extra options, which are a great help.

I think it would still be great to have the option to compress an image into a certain size without cropping it, for when you have an image which isn't quite at the right dimensions (but is close) and where you can't crop anything out for one reason or another - if it's just a small difference in ratio it won't look too bad, especially when we're talking about a smaller image like an icon.

Appreciate it's a fairly niche thing though Smile

I may be able to add this as a simple checkbox on the resize tab.  If the box is checked, I can make it resize to the dimensions without cropping and just squishing the image into the desired AR.
azuravian
Offline

#8
01-28-2021, 06:28 PM
Updated to 1.15 - Minor Update

Changes - Added a checkbox to resize to Keep Aspect Ratio.  This box is checked by default and will result in the normal behavior.  If you uncheck the box, the image will be resized to the exact aspect ratio entered, which may cause the image to be distorted.

pext added to original post
DonkeyOatay
Offline

#9
01-28-2021, 06:30 PM
That’s perfect - many thanks!
azuravian
Offline

#10
01-31-2021, 10:20 PM
New version 1.2

Added option to flip images horizontally.  I use this for some backgrounds if the logo/icon gets in the way on the theme I am using.  Flipping an image with text will result in backwards text, obviously.

Updated restoration folders to be per option.  For example, if you use resize, it will save the original image to be restored later.  If you then use colorshift, it will save the file after resizing, but before colorshifting.  If you then restore, from colorshift, you will go back one step, while restoring from resize, will go back two steps.

Updated pext added to original post.
azuravian
Offline

#11
02-01-2021, 08:11 PM
New version 1.3

Added option to fade the edges of images.  I use this for logos/icons that have a sharp edge (where I can't find a good transparent image).

Example:
Before
   

After (using a fade level of 20)
   

Updated pext added to original post.
azuravian
Offline

#12
02-19-2021, 01:11 AM
New update to v1.5:

  • Added logo as a media type.  To use this, you must have the ExtraMetadata extension installed.
  • Added capability to resize images to a larger size.  The box to "only shrink" is checked by default.  If you uncheck this box, then the images will still be processed even if the width and height are both larger than the current image.
azuravian
Offline

#13
02-23-2021, 04:40 PM (This post was last modified: 02-23-2021, 05:00 PM by azuravian.)
new update to 1.6 added to post.

Added new trim function to automatically remove any border from the image. There is a checkbox (default: checked) that will only remove the border if it is transparent. I use this to remove the transparent padding on a lot of logos that are downloaded.

1.6.1 fixes error when trying to trim an image that has a grayscale colorspace instead of RGB.
azuravian
Offline

#14
03-01-2021, 03:33 PM
new update to 1.8 added to original post:

Renamed to Game Media Processor.
Options related to backup of images.
Madcore
Offline

#15
10-18-2021, 06:42 PM
It's possible to "squarefy" an image? I want to expand some images to an 1:1 ratio while mantaining aspect ratio, and filling the space needed with pixels to get that 1:1 ratio. I think that can be a good way to change some icons.
Gildum
Offline

#16
11-10-2021, 08:06 PM (This post was last modified: 11-10-2021, 08:09 PM by Gildum.)
This tool is amazing, thanks for sharing! Previously I used a combination of the search tool "Everything" and the image resizer tool "FastStone Photo Resizer" to batch resize playnite's media files and save storage. It was an okay solution, but with this extension it's just perfect.

I noticed the following bug with the "Resize and Crop" function:

- after doing any task in Game Media Processor, "Resize and Crop" will always process images, even if they are are smaller than the specified values
- toggling the "Only Shrink" box will have no effect anymore
- the issue will persist until you restart playnite
- basically the "Resize and Crop" function only works properly the first time you launch playnite and when it's the very first task you do in Game Media Processor
azuravian
Offline

#17
11-24-2021, 05:18 AM (This post was last modified: 11-24-2021, 05:18 AM by azuravian.)
(10-18-2021, 06:42 PM)Madcore Wrote: It's possible to "squarefy" an image? I want to expand some images to an 1:1 ratio while mantaining aspect ratio, and filling the space needed with pixels to get that 1:1 ratio. I think that can be a good way to change some icons.

It can't do this currently, but this is something I could add over the holidays.  I've mostly moved to updating this for Playnite 9.  Are you using 9 or 8?

(11-10-2021, 08:06 PM)Gildum Wrote: This tool is amazing, thanks for sharing! Previously I used a combination of the search tool "Everything" and the image resizer tool "FastStone Photo Resizer" to batch resize playnite's media files and save storage. It was an okay solution, but with this extension it's just perfect.

I noticed the following bug with the "Resize and Crop" function:

- after doing any task in Game Media Processor, "Resize and Crop" will always process images, even if they are are smaller than the specified values
- toggling the "Only Shrink" box will have no effect anymore
- the issue will persist until you restart playnite
- basically the "Resize and Crop" function only works properly the first time you launch playnite and when it's the very first task you do in Game Media Processor

Thanks for the info, I'll take a look at this.  Are you using Playnite 9 or 8?
Gildum
Offline

#18
11-24-2021, 02:49 PM
I'm using the most recent Playnite version 9.6.
Madcore
Offline

#19
11-24-2021, 02:53 PM (This post was last modified: 11-24-2021, 02:53 PM by Madcore.)
(11-24-2021, 05:18 AM)azuravian Wrote: It can't do this currently, but this is something I could add over the holidays.  I've mostly moved to updating this for Playnite 9.  Are you using 9 or 8?

Playnite 9
azuravian
Offline

#20
11-25-2021, 05:28 AM
Awesome, probably will abandon this for P8. I'll update the P9 extension this weekend most likely. Gotta spend some time with family as well, of course.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode