Archive for July, 2007
The Right shading
26.07.2007 Anton VolkovHighlights
25.07.2007 Anton VolkovRepearing lighting system
25.07.2007 Anton VolkovGeosphere
21.07.2007 Vladimir BabushkinHolo-cube
15.07.2007 Anton Volkov12-gon sphere
13.07.2007 Anton VolkovOptimizing honest Z-sorting
12.07.2007 Anton Volkov3D-console
10.07.2007 Dmitry AmelinPSD-parser
09.07.2007 Alexey KviringPhotoshop with its PSD files is a standart de-facto. The game wants to read all that additional parameters, like pivot point, slices and so on. We decided to use separate layers to store this info. Then is came to a need of PSD-parser. We did’t found any real quality parsers, so we made it by ourselves in a week.
Here is an example of using this neat thing:
PSDParser parser = new PSDParser(new FileInputStream("image.psd")); PSDLayerAndMask layerAndMask = parser.getLayerAndMask(); List layers = layerAndMask.getLayers(); List images = layerAndMask.getImageLayers(); int i = 0; for (PSDLayerStructure layer : layers) { PSDLayerPixelData pixelData = images.get(i); BufferedImage image = pixelData.getImage(); if (image != null) ImageIO.write(image, "png", new File(layer.getName() + ".png")); i++; }
Sourse
Sourse can be downloaded freely under APACHE LICENSE.
Features: all layers export (incl. main), main file info, full slices support.
Use this on your own risc, and we’ll be glad to hear any comments too (bugs, ideas).
