Questions tagged [png]

PNG is a raster graphics file format.

Portable Network Graphics, is a raster graphics file format that supports lossless data compression. PNG was created as an improved, non-patented replacement for Graphics Interchange Format (GIF). PNG is supported widely in game development industry.

46 questions
213
votes
4 answers

How can I store game metadata in a .png file?

Spore allows player-created creatures to be shared by exporting a .png file. That .png is a photo of the creature, but if it's imported into the game, the creature's information (such as textures, size, and shape) also come with it. How can I…
ibrabeicker
  • 2,951
  • 4
  • 24
  • 20
6
votes
1 answer

Re-coloring PNG images with an indexed palette

I'm creating some images for an existing game that allows for custom content. I have a large collection of PNG images with indexed colors (all using the same palette). I would like to be able to go through these images and selectively paint over…
Andrew
  • 161
  • 5
5
votes
2 answers

Animations with individual images in Phaser.js

So I have this game that I made a while back and I want to port it using Phaser. The game is made using individual PNG files for all the animation frames, and there are over 100 of them. From reading through the docs, it seems Phaser only supports…
tigerwoods345
  • 61
  • 1
  • 3
4
votes
1 answer

Image edges are distorted inside game

I dont know how to explain this, so I will use images to describe my problem. The image I made using InkScape: What it looks like in-game (ignore the runner): As you can see the edges are not "sharp" ingame, even the static background…
Green_qaue
  • 1,933
  • 4
  • 26
  • 57
4
votes
1 answer

When should I use color keying vs PNG transparency?

SDL (and other toolkits) can use color keying to make a certain color in an image transparent. Alternatively, you could load a PNG image that supports transparency. When should I use which?
user44066
  • 43
  • 1
  • 3
4
votes
3 answers

How to play animations (GIF, SWF... )?

I have many diffrent animations made with flash. I can make it as (1).SWF, (2).GIF or as (3).PNG (every Frame per second). Searched in google... but coudn't find anything usefull. SWF: For SWF i need Flash on the android phone... this is something…
Spenhouet
  • 365
  • 4
  • 14
4
votes
2 answers

How to load a png file without alpha premultiplying in ios?

I am making a game in which I use the alpha value, in some cases for transparency, in others for occlusion, and for HDR in others. I'm loading the images like this (this is MonoTouch, but objective-c can be easily converted to c#): CGImage bitmap =…
Panda Pajama
  • 13,555
  • 5
  • 49
  • 81
4
votes
2 answers

How to pass PNG image data directly to SDL?

Well passing just external PNG to SDL is very easy with the SDL_image library. I have a class that does just that. The code looks like the following: SDL_Surface* Texture::LoadImg(const char *filename) { SDL_Surface* Image = IMG_Load(filename); if…
ZeroVash
  • 143
  • 1
  • 5
4
votes
2 answers

How to write from shader to a texture to a PNG in Unity?

I want to write the information from my shader into a texture and save it in a png. I found this: http://forum-old.unity3d.com/threads/save-texture-generated-by-a-shader.326561/ and this System.IO.File.WriteAllBytes(Application.dataPath +…
OC_RaizW
  • 1,480
  • 8
  • 27
  • 50
4
votes
1 answer

LibGDX - How to export a texture as a .png onto, say, the desktop

I'm making a game in which I need to export a texture which the user has edited as a .png into a specified location. I'd like it if I could have the default saving window thing (like on other apps when you do cmd+s). If this isn't possible, is there…
Zac G
  • 61
  • 2
  • 6
3
votes
3 answers

Reducing APK File Size by using JPG instead of PNG for game background images

I've just finished my (openGL ES 2.0 Android) game and it's almost ready for Alpha-testing. When I export the application to an APK File, the file is taking up 16MB and I would like to reduce this as much as I can. Here are some points about what…
BungleBonce
  • 1,937
  • 2
  • 34
  • 71
3
votes
1 answer

Black or White Border/Shadow around PNGs in SDL/OPENGL

having the same issue as this: Why do my sprites have a dark shadow/line/frame surrounding the texture? however, when I do the fix suggested there (changing GL_SRC_ALPHA to GL_ONE) it just replaces the black border with a white border on the images.…
Dylan
  • 31
  • 3
3
votes
2 answers

Exporting distinct images from a sprite sheet using GIMP

I have recently found that in Photoshop there is a script that enables you to export individual images on different layers into distinct png images on disk. Is it GIMP capable of doing the same thing and how? I have a sprite sheet (png image) and…
Vlad
  • 209
  • 3
  • 9
3
votes
2 answers

How can I access bitmaps created in another activity?

I am currently loading my game bitmaps when the user presses 'start' in my animated splash screen activity (the first / launch activity) and the app progresses from my this activity to the main game activity, This is causing choppy animation in the…
BungleBonce
  • 1,937
  • 2
  • 34
  • 71
2
votes
2 answers

Creating a png sequence in Flash? details?

I was wondering if someone could please explain the process and rules for turning an animation into a png sequence, in flash CS5. I know you can go to export movie and chose png sequence but sometimes I only get 1 frame? I don't know if my character…
Hunter
  • 175
  • 2
  • 7
1
2 3 4