Updated: November 11 - 2023
Script Name: PSPImageHistoryRemover
Download Link: https://github.com/LeviFiction/PSPImageHistoryRemoval
Compatibility: PSP X9-2023
Requirements: Place in Scripts-Trusted Folder
Description:
Currently PSP does not offer a convenient way to remove the edit history from you PSPImage files. This script will attempt to make a copy of your image and remove the edit history.
The reason it makes a copy is to avoid any potential damage or loss to the file structure if something doesn't work out quite like I had planned.
When running the script if you already have an image open it'll ask if you want to remove the history of the current image. IF you say yes, it'll attempt to remove the history of the current image. Please note the image must be a saved PSPImage file otherwise it will fail. If you say "No" or if you don't have an image open it'll ask you to find the file/files you want the history removed from. It'll remove the history then open the image in PSP.
Updated to Version 0.2 - No longer removes EXIF and XMP data from the extended data block. Though might be a bit slow on really large images.
Updated to Version 1.2 - Speed is now almost instantaneous. Just reversed the logic of the script and it sped everything up.
Script - Remove History - v1.2
Moderator: Kathy_9
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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
Script - Remove History - v1.2
Last edited by LeviFiction on Sun Nov 12, 2023 6:31 am, edited 2 times in total.
https://levifiction.wordpress.com/
-
Jean-Luc
- Advisor
- Posts: 2177
- Joined: Sat Oct 22, 2011 10:50 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUS Computer N751J
- processor: Intel i7_4710 HQ 2_50GHz
- ram: 16GB
- Video Card: NVIDIA GeForce GTX 850M
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2 Tb
- Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
- Corel programs: PSP X7, X9, 2018 to 2023
- Location: Belgium (French speaking)
- Contact:
Re: Script - Remove History
Tested...
History is removed. OK.
Some EXIF infos are discarded in the duplicate file.
File size is increased (???).
I need more testing...
History is removed. OK.
Some EXIF infos are discarded in the duplicate file.
File size is increased (???).
I need more testing...
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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
Re: Script - Remove History
Excellent! I, unfortunately, never tested EXIF because none of my test images had any EXIF information.
If you have any example images you'd be willing to post both the before and after history removal for extra testing I would appreciate it. Because the newest version of the file format documentation for PSPImage comes from all the way back in version 9, I'm kind of guessing my way around things. xD Thankfully they made a really good format that simply adds blocks in order to add new features. So it should be easy to find the unknown value and begin testing to find out what it is.
If you have any example images you'd be willing to post both the before and after history removal for extra testing I would appreciate it. Because the newest version of the file format documentation for PSPImage comes from all the way back in version 9, I'm kind of guessing my way around things. xD Thankfully they made a really good format that simply adds blocks in order to add new features. So it should be easy to find the unknown value and begin testing to find out what it is.
https://levifiction.wordpress.com/
-
Jean-Luc
- Advisor
- Posts: 2177
- Joined: Sat Oct 22, 2011 10:50 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUS Computer N751J
- processor: Intel i7_4710 HQ 2_50GHz
- ram: 16GB
- Video Card: NVIDIA GeForce GTX 850M
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2 Tb
- Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
- Corel programs: PSP X7, X9, 2018 to 2023
- Location: Belgium (French speaking)
- Contact:
Re: Script - Remove History
I have tested with Corel samples image : fresh.jpgLeviFiction wrote: If you have any example images you'd be willing to post
It is made by an Apple iPhone.
Camera information is removed and also the size (Mo) after the script.
Didn't verify other data.
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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
Re: Script - Remove History
Interesting, so I tried several of the sample images. Thank you for that.
I made two very simple scripts, one that saved the EXIF information to a file, and one that read it back in and compared it to the current image. I then ran the save exif script, then removed the history, loaded in the NoHistory version, and ran the comparison script.
Alright, using Fresh here is the information that was lost.
ExifSoftware : 8.1.2
ExifDigitizedSubSecond : 977
ExifMake : Apple
ExifHeight : 2448
ExifModel :iPhone 5s
ExifWidth : 2448
Size on Disk went from 26MB to 8MB = 18MB smaller
HotAirBallons lost Information
ExifSoftware : QuickTime 7.6.9
ExifOriginalSubSecond : 0
ExifDigitizedSubSecond : 0
ExifMake : Canon
ExifHeight : 5184
ExifModel : Canon PowerShot SX610 HS
ExifWidth : 3888
ExifAltitudeRef : 0
ExifGPSStatus : A
Size on Disk went from 62MB to 44MB = 18MB smaller
Green lost information
ExifSoftware : 7.0.5
ExifDigitizedSubSecond : 150
ExifMake : Apple
ExifHeight : 2448
ExifModel : iPhone 5s
ExifWidth : 3264
Size on disk went from 35MB to 17MB = 18MB smaller
Heart lost information
ExifSoftware : 7.0
ExifDigitizedSubSecond : 16
ExifMake : Apple
ExifHeight : 1936
ExifModel : iPhone 4
ExifWidth : 2592
ExifAltitudeRef : 0
ExifGPSStatus : A
Size on disk went from 25MB to 8MB = 17MB smaller
So....now that I have that information. I wonder how the EXIF data is offset in PSP. Or if these particular EXIF data points are simply stored in the same info block as the history. I'll have to either make an EXIF reader for PSPImage format or just manually go through it in a hex editor to find out how it works.
I made two very simple scripts, one that saved the EXIF information to a file, and one that read it back in and compared it to the current image. I then ran the save exif script, then removed the history, loaded in the NoHistory version, and ran the comparison script.
Alright, using Fresh here is the information that was lost.
ExifSoftware : 8.1.2
ExifDigitizedSubSecond : 977
ExifMake : Apple
ExifHeight : 2448
ExifModel :iPhone 5s
ExifWidth : 2448
Size on Disk went from 26MB to 8MB = 18MB smaller
HotAirBallons lost Information
ExifSoftware : QuickTime 7.6.9
ExifOriginalSubSecond : 0
ExifDigitizedSubSecond : 0
ExifMake : Canon
ExifHeight : 5184
ExifModel : Canon PowerShot SX610 HS
ExifWidth : 3888
ExifAltitudeRef : 0
ExifGPSStatus : A
Size on Disk went from 62MB to 44MB = 18MB smaller
Green lost information
ExifSoftware : 7.0.5
ExifDigitizedSubSecond : 150
ExifMake : Apple
ExifHeight : 2448
ExifModel : iPhone 5s
ExifWidth : 3264
Size on disk went from 35MB to 17MB = 18MB smaller
Heart lost information
ExifSoftware : 7.0
ExifDigitizedSubSecond : 16
ExifMake : Apple
ExifHeight : 1936
ExifModel : iPhone 4
ExifWidth : 2592
ExifAltitudeRef : 0
ExifGPSStatus : A
Size on disk went from 25MB to 8MB = 17MB smaller
So....now that I have that information. I wonder how the EXIF data is offset in PSP. Or if these particular EXIF data points are simply stored in the same info block as the history. I'll have to either make an EXIF reader for PSPImage format or just manually go through it in a hex editor to find out how it works.
https://levifiction.wordpress.com/
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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
Re: Script - Remove History
Okay, so I had assumed the block where the history was found was purely a history block. Turns out it's an XML block. Which includes EXIF data. So that would explain the lost EXIF as I just throw out the xml block altogether. It's why the script is so fast as well, I just skip over the data we're getting rid of. In order to get rid of only the history and keep the exif data would be a slight bit slower. Not by much, but...if you ever see a 300+mb file that could be a bit slower. Especially as I wouldn't want to load it all in to memory just to separate the history from everything else. So I'd have to identify the beginning and ending tags then skip over those an re-define the size of the block. And the container block.
https://levifiction.wordpress.com/
-
Jean-Luc
- Advisor
- Posts: 2177
- Joined: Sat Oct 22, 2011 10:50 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUS Computer N751J
- processor: Intel i7_4710 HQ 2_50GHz
- ram: 16GB
- Video Card: NVIDIA GeForce GTX 850M
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2 Tb
- Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
- Corel programs: PSP X7, X9, 2018 to 2023
- Location: Belgium (French speaking)
- Contact:
Re: Script - Remove History
I understand ...
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
-
SJS
- Posts: 148
- Joined: Thu May 26, 2011 1:31 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Dell Inc 0KWVT8 A03
- processor: 11th Gen Intel Core TM i7-11700
- ram: 16 GB
- Video Card: NVIDIA GeForce GTX 1660 Ti 6GB GDDR6
- sound_card: Onboard Realtek Codec
- Hard_Drive_Capacity: 4 TB
- Monitor/Display Make & Model: DELL U2412M
- Corel programs: PaintshopPro 2022 Ultimate
- Location: Washington State, USA
- Contact:
Re: Script - Remove History - v0.2
Thank you for this script! My <4MB file grew to 115MB overnight and I had no idea why! PSP was incredibly slow, almost dysfunctional with that file, and I have given up on these absurdly large files previously without knowing the cause/cure.
The script took a few minutes to complete, but did the job. Now my mostly vector file is tiny and life is better.
The script took a few minutes to complete, but did the job. Now my mostly vector file is tiny and life is better.
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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
Re: Script - Remove History - v1.2
Updated with near instantaneous speed over the previous version.
Updated: November 11 - 2023
Script Name: PSPImageHistoryRemover
Download Link: https://github.com/LeviFiction/PSPImageHistoryRemoval
Compatibility: PSP X9-2023
Requirements: Place in Scripts-Trusted Folder
Updated: November 11 - 2023
Script Name: PSPImageHistoryRemover
Download Link: https://github.com/LeviFiction/PSPImageHistoryRemoval
Compatibility: PSP X9-2023
Requirements: Place in Scripts-Trusted Folder
https://levifiction.wordpress.com/
