Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MufasaRKG on Mon 16/03/2015 00:27:49

Title: Having trouble importing "Sprites" from Photoshop CS3
Post by: MufasaRKG on Mon 16/03/2015 00:27:49


I'm getting a little annoyed trying to research correct information as to how to import new sprites I created in photoshop. The file size is 20 x 50 pixels in 300 resolution in 32 bit color (RGB). However, i believe since of the file size, Photoshop is not giving me the options to save as BMP or PNG as usual with my regular graphic designs.

The message im getting every time I attempt to import a sample sprite, it states "The Parementer is not valid". What am I doing wrong?

-m


Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: Retro Wolf on Mon 16/03/2015 06:42:56
I haven't used Photoshop in a long time; if you're making low res sprites, use GraphicsGale. It's free, and perfect for pixel art.
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: Cassiebsg on Mon 16/03/2015 16:16:08
I'm not a Photoshop user either, but I've noticed that my Corel Photo Paint, sometimes also refuses to save as PNG or anything that isn't a Corel format. I've since found that if I have active mask/selection or objects selected (maybe even different layers) is what is causing the problem. Try "flatting" the picture by merging all layers, and remove/de-select any active object or mask, then try saving the picture again.

No idea, if that'll solve your problem, but can't hurt to try it. ;)
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: MufasaRKG on Mon 16/03/2015 16:33:07
Thank you, I also had to take a hour or so to learn to toggle with the color bit. I notice when I had the pixels so small I need to drop the bit down to 16 bit for it to read correctly and it did seem to work. Now I have to learn to clean around the dithering.

-m
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: monkey0506 on Mon 16/03/2015 16:44:10
Something seems wrong here. Images of any size can be imported at 32-bit with or without an alpha channel. A 1x1 image with alpha can be saved and imported into AGS correctly.

You do not need to downgrade your graphics to 16-bit.

You might need to check that your image is actually set to 8-bits per channel (32-bit RGBA leaves 8-bits per channel) - which it should be anyway if you're actually exporting a 32-bit image - because something is wrong with your image if it's not letting you save it as a PNG.
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: Snarky on Mon 16/03/2015 16:58:27
I don't have CS3, but it works fine to save a 20x50 32-bit png file in recent Photoshop versions.

Most likely your problem is the same old confusion between 32-bit PER PIXEL and 32-bit PER CHANNEL. A normal 32-bit image has 8 bits per channel (RGB and alpha); while a 32-bits-per-channel image has 96 bits per pixel and no alpha, and is most useful for HDR photography. Since monitors can't display that many different shades anyway (most consumer-grade monitors can't even display 32/24-bit fully), you should see no dithering when converting down.

Photoshop mostly uses the per-channel measure (even though it doesn't always say so explicitly), so if you're going for a normal 32-bit PNG, you should set the color depth to 8-bit.
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: MufasaRKG on Mon 16/03/2015 18:12:35
I understand now.  Can it be possibly because I'm using real life photos I took, them cropping them out and shrinking down to the bit size that AGS can read correctly, may that be the issue?

-m
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: Snarky on Mon 16/03/2015 18:36:53
In Photoshop, go to Image | Mode. Check that it's set to "RGB Color" and "8 Bits/Channel". Save as a PNG file. AGS should be able to read this file.
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: MufasaRKG on Mon 16/03/2015 19:19:55
Awesome news^! Thank you, I just imported my first "CLEAN" sprite. Now the challege is to set and clean them all right this way.
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: monkey0506 on Mon 16/03/2015 19:26:12
Thanks for that clarification Snarky. I've never used more than 8-bit channels myself, so I didn't really know how to explain it that well. ;)
Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: Monsieur OUXX on Tue 17/03/2015 09:36:55
monkey_05_06 gave the answer: it's a very common trap in photoshop: I fell into it countless times :
- At some stage, by mistake (possibly with a stupid shortcut), you change the color depth from 8bits per layer to 32bits per layer
- Photoshop then won't let you save your image in common formats such as BMP, JPG or PNG and you don't know why
- You suspect it's caused by the color depth, but then you get confused by the "32 bits per layer", which is NOT synonymous to "32 bits image".

Never forget: 99% of the times, The correct setting is 8 bits per layer.

Title: Re: Having trouble importing "Sprites" from Photoshop CS3
Post by: MufasaRKG on Tue 17/03/2015 15:21:44
Thank you! I will keep that in mind. I was toggling with the bit channels too much so that is why my save settings did change when it came down to export them.

-m