Questions related to images, including creation and modification

learn more… | top users | synonyms

51
votes
5answers
13k views

Which image format is more memory-efficient: PNG, JPEG, or GIF?

Which image format is more efficient to save memory? PNG, JPEG, or GIF?
40
votes
7answers
3k views

Managing text-maps in a 2D array on to be painted on HTML5 Canvas

So, I'm making a HTML5 RPG just for fun. The map is a <canvas> (512px width, 352px height | 16 tiles across, 11 tiles top to bottom). I want to know if there's a more efficient way to paint the ...
36
votes
5answers
1k views

Best Way to allow players to “Dye” images without losing color quality?

I am creating a 2.5D isometric (2D images) game. I want the players to be able to "dye" their armor, clothes, and other things. I find that grayscaling everything leads to losing out on some of the ...
14
votes
4answers
1k views

Why would some PNG files extracted from games display incorrectly?

I've noticed extracting PNGs from some game files that the image becomes distorted part-way through. For example, here are a couple of PNGs extracted from the Textures file in Skyrim: Is this some ...
11
votes
1answer
851 views

How can I get the palette of an 8-bit surface in SDL.NET/Tao.SDL?

I'm looking to get the palette of an 8-bit surface in SDL.NET if possible, or (more than likely) using Tao.SDL. This is because I want to do palette swapping with the palette directly, instead of ...
10
votes
2answers
219 views

Should the color of a texture be adjusted for display on a television?

If a 24bit RGB image with a range of 0-255 per channel is displayed on a television that displays a range of approx. 16-235 per channel, color detail will be lost, correct? If so, should images be ...
8
votes
3answers
531 views

Why is it possible to encounter a texture coordinate greater than 1 or less than 0

I'm studying a text about texture mapping and in the preparing to draw session, I read: Define the texture wrapping parameters. This will control what happens when a texture coordinate greater than ...
7
votes
5answers
1k views

Is there a game oriented graphics or image editor?

I remember looking a few times over the years for an alternative to Photoshop for editing images. I've tried using Gimp too, and that's also not quite sufficient. There are some problems that have ...
7
votes
2answers
2k views

How can I resize pixel art in Pyglet without making it blurry?

I have a tileset of 8x8 pixel images, and I want to resize them in my game so they'd be double that (16x16 pixels, e.g. turning each pixel into a 2x2 block.) What I'm trying to achieve is a ...
7
votes
3answers
2k views

Storing a Hex Grid

I've been creating a small hex grid framework for Unity3D and have come to the following dilemma. This is my coordinate system (taken from here): It all works pretty nicely except for the fact I ...
7
votes
1answer
2k views

How to create a XNA texture from a GDI Image with source rectangle?

A Texture2D in XNA can only hold so much. Depending on which profile I use that limit is either 2048 or 4096 pixels wide. As far as I could tell from my research (someone correct me if I'm wrong) GDI ...
6
votes
4answers
2k views

Which image format to use for sprites in an HTML5 game?

In a 2D HTML5 game, what is the best image format to use and why? Should I use different formats in different situations? For example, .png for the background image, .jpeg for the animation frames and ...
6
votes
1answer
192 views

Can SFML load anything other than RGBA8888? (RGBA4444, RGB565, etc.)

I can't see this mentioned in the documentation. Am I missing something obvious? Or does SFML really give you no option, forcing everything to be loaded as RGBA8888? Searches on Google and the SFML ...
5
votes
1answer
341 views

Rendering scaled-down card images

I have high-quality SVG card images, but they drastically lose their quality when I downsize them. I have tried two ways of rendering cards (using Inkscape and Imagemagics): 1) Render SVG to high-res ...
5
votes
2answers
1k views

OpenGL 3.0+ framebuffer to texture/images

I need a way to capture what is rendered on screen, i have read about glReadPixels but it looks really slow. Can you suggest a more efficient or just an alternative way for just copying what is ...
5
votes
1answer
262 views

Split Texture2D Across Line

Background I'm using a texture as a damage map represented by an array of floats for displaying damage effects on a space ship in a process. An upside of this is being able to 'slice' ships in ...
4
votes
1answer
530 views

Whats the point of all these Surface Formats

I am relevantly new to Graphics Programming. I have written some basic games in xna in the past but I am trying to understand what the point of all these surface formats is. For instance Xna and DDS ...
4
votes
1answer
528 views

Should I be concerned about assets being accessed by dumping VRAM?

I have heard many people tell me that a user can dump the VRAM on their GPU and get all the images in my game. Including all "Streamed" images. This includes most of my Menu graphics. How would a ...
4
votes
6answers
2k views

How to get quality sprite sheet generation with rotations

I'm working on a game that uses sprite sheets with rotation for animations. While the effect is pretty good, the quality of the rotations is somewhat lacking. I exported a flash animation to png ...
4
votes
4answers
511 views

Can a high FPS negatively affect how a program runs?

Yeah I know this is a broad question and will get down rated, I'm just hoping for some answer before it gets closed. Anyway, I'm using Slick 2D/Java to play around with graphics. I'm having some ...
4
votes
4answers
3k views

Need a good quality bitmap rotation algorithm for Android

I am creating a kaleidoscopic effect on an android tablet. I am using the code below to rotate a slice of an image, but as you can see in the image when rotating a bitmap 60 degrees it distorts it ...
4
votes
2answers
496 views

Use large image individually, or in TextureAtlas?

Does it make any sense to include a large image (with dimensions of say 1920x1080) in a TextureAtlas and then use it with libgdx for example? Or should I rather use it individually and include the ...
4
votes
1answer
380 views

How do I draw a zoomable image in OpenGL?

Up to now I have used glDrawPixels but since my image is a large geotiff one, I'm getting some horrible results for example: this is the code used for zoom extent: void ...
4
votes
1answer
2k views

How can I convert a 2D bitmap (Used for terrain) to a 2D polygon mesh for collision?

So I'm making an artillery type game, sort of similar to Worms with all the usual stuff like destructible terrain etc... and while I could use per-pixel collision that doesn't give me collision ...
3
votes
2answers
179 views

split pngs for sidescroller

I want to split a long png from my artist into vertical chunks that I can load into my code for a side scroller. Is there a tool that will help do that or do I have to do it manually?
3
votes
1answer
601 views

How can I optimize this flood fill algorithm?

I'm creating a sprite and animation editor like this one. I'm having performance issues with my flood-fill algorithm. Basically, I open an image with the different modules that are part of a frame of ...
3
votes
1answer
398 views

Pygame performance issue for many images

I've made a script for generating a game world based off of image pixel data. Trying to make a python map editor My progress so far has resulted in a program which loads an image and draws sprites ...
3
votes
1answer
342 views

What algorithms exist for generating collision geometry from an image?

I am currently working on a game using SFML and Box2D. I am interested in generating collision geometry from the sprite data that I load into SFML. So, for example, an algorithm that would do this ...
3
votes
1answer
357 views

Javascript tile map -> bitmap or JSON

I would like to know which idea is better in terms of performance. The map is 5000x5000 tiles and I plan to expand it even more. It is split into 50x50 regions and camera doesn't move with player, ...
3
votes
2answers
1k views

Splitting a texture atlas into seperate images [duplicate]

Possible Duplicate: How to decompose sprite sheet I'm doing a port of an existing game and the designer no longer has all of the original art; he only has the resulting texture atlases he ...
3
votes
1answer
193 views

Can I use one set of images to represent multiple sprites in Java?

I've got a game that has 3 basic sprites, at the moment I'm loading 8 images into each sprite for animating. Each character class has a sprite object. if I've got 10 characters on screen at once ...
2
votes
2answers
1k views

Best practice for image compression

Which is the best format or best technique to compress images without loss of quality for iPhone/iPad games?
2
votes
2answers
321 views

there is a BLOB standard to store images in memory?

I would like to abstract all the images in memory, to do so i would like to have just 1 format of reference without talking about the usual file formats for the filesystem like JPG, TGA, and so on. I ...
2
votes
1answer
246 views

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?
2
votes
1answer
238 views

Basic knowledge for 2d gaming and images?

Can anybody refer me some pdf or ebook that i should follow for basic 2d programming and texture ,shaders and other gaming elements details in depth.By which i can easily get through the 2d game ...
2
votes
2answers
1k views

State of the art in image compression?

I'm looking for good algorithms for compressing textures offline (ie decompressing them at install or load time, I know about using DXT/3DC to save runtime video memory, but these create awful visual ...
2
votes
1answer
2k views

Libgdx loading images

I can't find a sulotions that solves my problem, I've tried pretty much every tip I can find, but with no luck. Error : Exception in thread "LWJGL Application" ...
2
votes
2answers
310 views

How do you handle iPhone graphics for both high and low DPI settings?

How do you guys create your game graphics for iPhone? Considering you need a retina version and a nomal one? Do you create a big version of your image, save HD, then resize to smaller version, and ...
2
votes
1answer
84 views

Weird effect when generating gradients for height map

I am experimenting with generating height maps using radial gradients and perlin noise, using a technique I found here: ...
2
votes
2answers
190 views

Should I create generic bitmap/sound/et cetera wrappers for Allegro?

Basically, I have been writing a game in C++ using Allegro. I mostly just use the library to draw bitmaps, draw text, and play audio. My main concern as the game continues to grow code-wise, is that ...
2
votes
1answer
158 views

Getting an images rgb value at click

I'm not sure if this is at all possible, but maybe it will spark up an interesting conversation. (Sidenote: working on a small game in Löve). I'm making an archery shooting kind of game, and I was ...
2
votes
1answer
613 views

Does swf provide better compress rate than zlib for png image?

Somebody told me that when a png image is stored in swf, it's separated to several layer, hence the alpha channel can be compressed better. Is it true? Or, once png image is imported into a swf, it's ...
2
votes
1answer
164 views

Multiple images written and read from one meta-file?

Short version: I need a way to store multiple image files in one bigger file, to be used using C#, preferably easily compatible with XNA. The files will be read, written to, but also adaitional files ...
2
votes
1answer
113 views

How to combine image with a gradient? Or make it more featured in a different way

I generate an abstract 128x128 image, that is in general two-color (it uses values scaled between "blue" and "white", or other similar color pair). I need to make the image more "featured". ...
2
votes
1answer
155 views

Is there a way to export all the images of my tweening effect in Flash?

i'm using Flash to create the animation of my character in 2D (i'm just beginning). Is it possible to make a tween effect of a character, and then automatically export all the images/frames? So far, ...
2
votes
1answer
740 views

How can I resize a set of sprite images?

Hey StackExchange GameDev community, I'm attempting to resize series of sprites upon instantiation of the class they're located in. I've attempted to use the following code to resize the images, ...
2
votes
3answers
630 views

Rendering a 3D scene without a window

This is kind of an odd question, but what would be the best solution for rendering a 3D scene without a render window active? The end goal would be to simply render a 3D scene to an image file. I ...
2
votes
1answer
35 views

SDL2_ttf gradient

I want to render some text using a gradient instead of a solid color, but I can't figure out how to. I first load a gradient like this: SDL_Surface* gradient = IMG_Load("blue-cian.png"); then I ...
2
votes
1answer
191 views

How do I convert a partially transparent image into polygons?

I'm using GLEE2D, a level editor allowing me to import images, scale them, rotate them, and position them onto layers and export the data into XML format. However, it does not tell me objects' ...
2
votes
1answer
104 views

How do I quantize an image into an arbitrary bitdepth with dithering?

In the games I make, sometimes I need to balance the quality of the images I show with the amount of memory they consume. This is especially true for smartphones and other devices with very tight ...