Tool Ren'Py webpFix.bat - Fix Corrupted webp File Headers [v0.1] [bas]

5.00 star(s) 1 Vote

bas

retired
Donor
Respected User
Former Staff
May 6, 2017
3,988
30,553
webpfix-screen.jpg
Overview:


A batch file utility for fixing corrupted webp file headers in Ren'Py games.

If you already have the installed but certain webp files won't show a thumbnail or show at all in your photo viewer, they may have corrupted headers. Use this tool to fix them.

Examples of games affected by this issue are webp images in " " and " ".
Updated: September 18, 2018
Author: @bas
Tool Version: v0.1
Language: English

Thanks to @Sam for UnRen, from whom I shamelessly stole the framework for this, and @TCMS for being a helpful cunt.

Features:
You don't have permission to view the spoiler content. Log in or register now.

Installation/Usage:
You don't have permission to view the spoiler content. Log in or register now.

Change-Log:
You don't have permission to view the spoiler content. Log in or register now.

More Info:
You don't have permission to view the spoiler content. Log in or register now.

webpfix-before.jpg webpfix-after.jpg
 

Sebille

Member
Aug 17, 2018
141
95
Didnt work for me, on Tangled Up.

I followed the instructions in Installation/Usage, but the damn webp images stay locked and wont show up with any program still. Yes I have the Webp codec installed.

This tool starts processing all the images one by one, but for every one of them, it tells me "cant open file" and "[Errno 2] No such file or directory"

WTF??

EDIT: Ok.....that was extremely weird. Since it couldnt open those files in that directory, I grabbed the whole folder (NO changes made) and simple Cut/pasted it straight into the D: drive. Like, D:\Tangled Up and then it worked.
I am baffled. o_O
 

Penfold Mole

Engaged Member
Respected User
May 22, 2017
3,116
7,613
Didnt work for me, on Tangled Up.

I followed the instructions in Installation/Usage, but the damn webp images stay locked and wont show up with any program still. Yes I have the Webp codec installed.

This tool starts processing all the images one by one, but for every one of them, it tells me "cant open file" and "[Errno 2] No such file or directory"

WTF??
You don't happen to have non-ASCII characters in the folder path?

Unren.bat worked without any problems?
 
  • Like
Reactions: Canto Forte

Sebille

Member
Aug 17, 2018
141
95
You don't happen to have non-ASCII characters in the folder path?

Unren.bat worked without any problems?
The folder was located inside a folder with [] in the name, as well as the symbol &
Unren worked just fine, but Webpfix had issues. Moving it to the root of the HDD fixed the issue.
 

randomname42

Member
May 30, 2017
139
338
Thanks very much for this, especially the information on exactly what was the problem with those WebP files which were showing unable to be loaded by most programs that support WebP. I used your python script to create a Mac version (mostly by modifying the UnRen code by @goobdoob because I'm lazy and it's a great starting point).

I use it (along with unrpa, unrpyc, etc.) by just sticking it in /usr/local/bin, making it executable (chmod 755) and calling it from whatever folder I happen to need it from.
 
D

Deleted member 968823

Guest
Guest
A very useful tool when you have corrupted WEBP files.
THANK YOU VERY MUCH!!!
 
  • Like
Reactions: bas

khumak

Engaged Member
Oct 2, 2017
3,824
3,858
Have been using this for awhile now and I love it. I've been using the 90% option which cuts the file size down to roughly 10% of what it was before and I honestly can't tell the difference in quality.

Edit: Actually commented on the wrong thread but I'm sure this utility is nice as well :)
 
  • Haha
Reactions: Twistty and bas

LazyPanda

Member
May 9, 2017
141
341
After 6 hours of searching the entire internet for a solution, I find this... and it works like a charm. Thank You. :heart:
Oddly it seems Microsoft paint can open some of the weird or corrupted headers easily lol.. if anyone wants to try this VN has a weird header for webp files. i got confused as hell.
 

hakarlman

Engaged Member
Jul 30, 2017
2,130
3,346
Does anyone know why the WEBP files get corrupted in the first place?

Is it because in " " and " " are using some kind of third party webp converter that is causing the problem?
 

Twistty

The Happy Beaver
Donor
Respected User
Former Staff
Sep 9, 2016
4,389
39,367
this only works with python 2
That is correct!

I made a self-contained version - linked below.

It's based off of the renpy-7.4.11-sdk
Just copy your images to the game folder and run the file.
Untitled.jpg
Ps. Miss ya bas (one of the best staff members EVER)!!!
 
  • Yay, update!
Reactions: rKnight
5.00 star(s) 1 Vote