Webp - Import and Export

Moderator: Kathy_9

LeviFiction
Advisor
Posts: 6730
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Webp - Import and Export

Post by LeviFiction »

Script Name: ImportWebP and ExportWebP
Download: With Google Utilities - https://drive.google.com/file/d/1UgB5nW ... sp=sharing
Just Scripts - https://drive.google.com/file/d/1UgB5nW ... sp=sharing
Compatibility: PSP 9-2023
Requirements: Place in Scripts-Trusted Folder
Extra requirements - If you download Script Only version you need the Google WebP tools located here - https://developers.google.com/speed/webp/download
VIdeo Demonstration: https://drive.google.com/file/d/1vaAnB- ... sp=sharing
Read description for details.

Description: While more useful for users of older PSP software looking to edit WebP files, these scripts can be used to import and export WebP files that PSP can't load or save currently (as of PSP 2023). This includes support for both reading and saving webp images with alpha transparency.

There are two versions of these scripts available for download. The standard one that includes the Google Utiltiies in the download for quick and easy use. OR the Script only version that requires you to download the Google Tools separately. I provided this option in case anyone was concerned about download an executable from an untrusted source like myself.

If you get the first version with the Google Tools built in. Just unzip everything into a folder inside of your Scripts-Trusted Folder (see video). The scripts should just run out of the box. I've programmed the script to look in your Scripts-Trusted folder for these programs so there is no need to edit the script. Just unzip and run.

If you get the second version you first need to download the Google Webp Tools from the official location - https://developers.google.com/speed/webp/download

Then unzip them into your scripts-trusted folder along with the Import and Export scripts. Then you can use them as well. Both versions are demonstrated in the Video.

If you already have these programs, or if you don't want them in your Scripts trusted folder, you can unzip them to any other location on your computer that you want. You just have to edit the scripts to point to the folder where the cwebp.exe and dwebp.exe files are stored. Again, this is demonstrated in the video linked above. To edit the script open it in Notepad or other text editor and look for the line "topDir = None". You're going to replace "None" with your path surrounded with double quotes "C:\\Your\\Path\\Here "

You'll notice in my example I'm using "\\" between each directory name. THis is because the "\" character has special meaning in Python. So you need to use two of them when writing the path. Or you need to put an "r" in front of the first quotation character like this r"C:\Your\Path\Here" the r will let you use single slashes instead of double slashes.

Once you've edited the script it's ready to use.

To use the script just run it from the script toolbar - an Open File dialog will pop-up asking you where to find the webp image. Select the webp or multiple webp images and the script will convert, and open them inside PSP. If you want to save a webP image in the latest format and with transparency support use the ExportWebP script. Again run it from the toolbar a dialog will ask you where you want to save the file and it'll do the hard work for you.
User avatar
Ken Berry
Site Admin
Posts: 22354
Joined: Fri Dec 10, 2004 9:36 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte B550M DS3H AC
processor: AMD Ryzen 9 5900X
ram: 32 GB DDR4
Video Card: AMD RX 6600 XT
Hard_Drive_Capacity: 1 TB SSD + 2 TB HDD
Monitor/Display Make & Model: Kogan 32" 4K 3840 x 2160
Corel programs: VS2022; PSP2023; DRAW2021; Painter 2022
Location: Levin, New Zealand

Re: Webp - Import and Export

Post by Ken Berry »

Thanks Matthew. I have gone for the easiest -- the option with the Google Utilities. Greatly appreciated!!
Ken Berry