I'd like to write a tool which is able to exchange bitmaps between different programs. Theoretically Windows is doing that job, but each program seems to have it's own style dealing with the clipboard. So selections or even the alpha layer of a PaintShop Pro image copied to the clipboard is not supported in all cases, so pasted images sometimes look horrible.
A quick check did show that PaintShop does fill multiple entries into the clipboard each time "copy" is used. I am able to enumerate these clipboard entries and can load the content into memory. But I have no idea how the content has to be decoded (especially the header).
Does anyone have information about the clipboard formats?
PaintShop Pro Clipboard format documentation
Moderator: Kathy_9
-
- Posts: 2
- Joined: Thu Aug 10, 2023 1:23 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
-
- Advisor
- Posts: 6775
- 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: PaintShop Pro Clipboard format documentation
Are you talking about the fact that PSP doesn't copy any alpha information in its BitmapDIBV5 data? Yeah, longstanding request for them to add support for either PNG or 32-bit BitmapDIBv5.
In that case PSP essentially saves a PSPImage file to the clipboard. Corel last released a format specification file back in 2005 so it won't have a lot of the features listed, but the image data specification should still be the same all of the way up to recent versions. No idea where to find it online so you can use my copy - https://drive.google.com/file/d/16k3VsG ... sp=sharing
In that case PSP essentially saves a PSPImage file to the clipboard. Corel last released a format specification file back in 2005 so it won't have a lot of the features listed, but the image data specification should still be the same all of the way up to recent versions. No idea where to find it online so you can use my copy - https://drive.google.com/file/d/16k3VsG ... sp=sharing
-
- Posts: 2
- Joined: Thu Aug 10, 2023 1:23 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: PaintShop Pro Clipboard format documentation
Thanks, that may help - will need a while to read that document 
I'd like to see how the clipboard itself gets filled when PSP copies an image to it...
Here's a view how the clipboard will look like: Now I'd need to know how the hex data (seen at the bottom) is built up, for me it seems like a table at the beginning (maybe defining the size and offset of the image data) followed by one or two images (using a JFIF format).

I'd like to see how the clipboard itself gets filled when PSP copies an image to it...
Here's a view how the clipboard will look like: Now I'd need to know how the hex data (seen at the bottom) is built up, for me it seems like a table at the beginning (maybe defining the size and offset of the image data) followed by one or two images (using a JFIF format).
You do not have the required permissions to view the files attached to this post.
-
- Advisor
- Posts: 6775
- 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: PaintShop Pro Clipboard format documentation
I use freeclipboardviewer myself. I like the previews. And when doing file views I like HxD for the hex.
The JFIF is the thumbnail. The PSPImage format is relatively simple. Everything is broken up into Blocks, chunks, and fields. All blocks have the same header so it's quick to jump around in the file. If memory serves you'll see the thumbnail block in the list of available blocks. And they each define their size to each other. If you're going to re-construct the image, well the thumbnail might actually be the best place. But if it's a single layer, those are simple, find the layer list block, find the first layer block, and then each channel is saved as a separate block usually in a modified RLE format for the compression so it's pretty straight forward.
The JFIF is the thumbnail. The PSPImage format is relatively simple. Everything is broken up into Blocks, chunks, and fields. All blocks have the same header so it's quick to jump around in the file. If memory serves you'll see the thumbnail block in the list of available blocks. And they each define their size to each other. If you're going to re-construct the image, well the thumbnail might actually be the best place. But if it's a single layer, those are simple, find the layer list block, find the first layer block, and then each channel is saved as a separate block usually in a modified RLE format for the compression so it's pretty straight forward.
-
- Posts: 685
- Joined: Mon Nov 01, 2010 5:54 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- ram: 4GB
- Monitor/Display Make & Model: 27 inch
Re: PaintShop Pro Clipboard format documentation
I found quite a few of them. Any particular?
-
- Advisor
- Posts: 6775
- 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