Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Relight on Fri 16/01/2004 00:31:44

Title: Question: Copying BG to Clipboard
Post by: Relight on Fri 16/01/2004 00:31:44
When copying BG to clipboard, does it go into the clipboard as the original background file with all the colors, or does it lose colors / color depth / quality?
Title: Re:Question: Copying BG to Clipboard
Post by: Reno Caspain on Fri 16/01/2004 06:09:00
According to my experiences, it loses quality. Single color areas tend to get dots of different shade on them, and colors are a bit off.
Title: Re:Question: Copying BG to Clipboard
Post by: Relight on Fri 16/01/2004 07:18:48
Thanks for the info! CJ, is there a way to make this function "export" the background properly? 'Twould be most helpful.
Title: Re:Question: Copying BG to Clipboard
Post by: Gilbert on Fri 16/01/2004 09:15:44
I'm not sure, but I think it would just copy whatever saved in the room file to clipboard, so, if your bg was originally a 24 bit one imported into a 16 bit hicolour game, details were already lost, so you can only copy out degraded image to the clipboard.

IMO the copy to clipboard functions for sprites/bgs are just last resort to retain resources in case you lost your working files, etc. If you keep the original image files intact and backup frequently, you'd rarely need this export function.
Title: Re:Question: Copying BG to Clipboard
Post by: Relight on Sat 17/01/2004 03:05:21
Thanks for the clarification Gilbot. I think I agree with your idea of how it works, that's what makes more sense to me.

Anyway, you're right, you shouldn't really need to use it. But then again... well, never mind.
Title: Re:Question: Copying BG to Clipboard
Post by: Scorpiorus on Sat 17/01/2004 16:20:44
QuoteI'm not sure, but I think it would just copy whatever saved in the room file to clipboard, so, if your bg was originally a 24 bit one imported into a 16 bit hicolour game, details were already lost, so you can only copy out degraded image to the clipboard.
The reason for it is that in 16bit game you really don't need 32bit backgrounds. Building a game AGS links room*.crm files (they store background images), it doesn't change them. Therefore the only way to reduce background depth is to process it during importing.

~Cheers
Title: Re: Question: Copying BG to Clipboard
Post by: Relight on Sat 22/05/2004 04:47:36
OK, so I tested this more and need to bump this. What I actually see in the game is not the same as what I get if I export the background to clipboard. I lose colors. So I have a smooth gradient and I could tell because it became much more... gradiated. Or whatever.

So is there any reason why the export background to clipboard cannot give the screen exactly as it should be? This would be most helpful. In case, you know, you don't have the original graphics files anymore.

Pumaman?
Title: Re: Question: Copying BG to Clipboard
Post by: Relight on Sat 22/05/2004 14:18:49
I could have sworn last night there was a message from Pumaman here asking for example. But then I fell asleep.

Here is the original graphic, 24-bit RGB in Photoshop.

(http://www.sylpher.com/relight/imghost/colors-original.png)

Now here is what it appears in-game print-screen in a 16-bit game. Of course, the game is only 16-bit, it starts to get some nasty banding.

(http://www.sylpher.com/relight/imghost/colors-ingame.png)

That banding in the above one doesn't matter. Cause that's what the game is. But I don't want to print-screen the game because then the image will have objects and stuff on it. I want to get the original (or even the 16-bit) image. But when you use the export background to clipboard function, you get what I show below. It should also be noted that this is what you see in the AGS editor itself in the room editor.

(http://www.sylpher.com/relight/imghost/color-clip.png)

Game files and those 3 image files:

http://www.sylpher.com/relight/download/colors.rar
Title: Re: Question: Copying BG to Clipboard
Post by: Pumaman on Sat 22/05/2004 18:41:42
The effect you are getting here is because Windows doesn't support 16-bit colour on the desktop - only 15-bit. Therefore, you're losing one bit of the colour accuracy which is causing this to happen.

Open your original 32-bit image in PSP, and Decrease Colour Depth to 15-bit (32K colours) - you'll see it's exactly the same result.

DirectX does support 16-bit, which is why it shows up correctly in-game, but in the editor AGS has to convert the 16-bit images to 15-bit for display (or for clipboard copy). On most scenes this isn't noticable, but on a gradient like you have there, you'll see it.
Title: Re: Question: Copying BG to Clipboard
Post by: Relight on Sat 22/05/2004 19:30:39
Good to know the real technical explanation - thanks.