Game Development Community

iT2d 1.4.1 - Crash when creating a new image map from BMP - RESOLVED

by Dennis Taapken · in iTorque 2D · 03/24/2011 (2:27 am) · 13 replies

Build: 1.4.1 Release

Platform: Windows Vista/7/XP

Target: Stand Alone (iTorque2DGame.app)

Issues: Application crash when trying to create a new image map from a bmp file. Loading the same image after converting bmp to png does not crash the system.

Steps to Repeat:
1. Run TGB editor.
2. Create a new Empty project
3. Click Create New ImageMap button
4. Select a .bmp file and press OK

About the author

Recent Threads


#1
03/24/2011 (5:39 am)
Ideally Torque should simply not accept the BMP rather than crash. iOS prefers PNG above all else and it's heavily accelerated, you shouldn't use anything else. If you want maximum performance work with a PNG then at the end perform texture compression steps.
#2
03/24/2011 (5:43 am)
On the Mac copy only
#3
03/24/2011 (6:35 am)
Unfortunatly the Windows version of iTorque has a file filter that includes jpg, png and bmp. Best thing is to change this if it is not recommended.

Thank you for providing me with the info concerning better performance with PNG, from now on i will use that format :-)
#4
03/24/2011 (7:47 am)
@Dennis - Please use the Bug Reporting Standards. If you could reformat your post, it will allow us to quickly reproduce and track the problem.
#5
03/24/2011 (8:05 am)
@Alistair: iOS doesn't have any form of special magic for PNG. Xcode can optionally convert them to a preferred bit order for the device. But that part isn't really necessary - I have yet to see any performance gains (which would only affect loading, anyway) from using that option.

When I make PNG graphics they're already optimised and Xcode's conversion will just make the files bigger. Images are converted to the right format when loaded - the in-memory representation is in the GPU's preferred arrangement. The source format doesn't matter. It's just that PNG is a good format in general :)

If you want real performance improvements, PVR is the way. But that doesn't work equally well for all kinds of graphics.
#6
03/24/2011 (8:11 am)
@Michael - i reformatted the issue
#7
03/24/2011 (9:20 am)
@Dennis - Great. Thanks
#8
03/24/2011 (9:24 am)
Logged as ITGB-139
#9
03/24/2011 (9:48 am)
I cannot reproduce this issue. QA is trying to now. I need some more information about your bmp file:

File Name:
Resolution:
Bit depth:
Size (in kb):
Source location:
#10
03/24/2011 (10:33 am)
Is there any way i can send you one of the bitmaps ? It is part of the following set http://www.lostgarden.com/files/HardVacuum.zip

Just try to load Crater.bmp from the Terrain Tiles in HardVacuum.
#11
03/24/2011 (11:07 am)
Ok. So your file does indeed crash. I believe the first problem is the Bit depth. My image's bit depth is 24. Your image's bit depth is 8. I'm going to change the bit depth for your image to see what happens.
#12
03/24/2011 (11:14 am)
When I changed it to 24, it did load into the editor. However, my change resulted it in being completely borked when loaded as an imageMap. When I exported the BMP as a PNG, everything worked ok.

My suggestion: Do not use BMP files for the time being. Moving forward, I will debug the crash to see what is happening. If the fix is something simple, I will make the change. If it is something complex and could potentially destabilize other aspects of the engine, I may deprecate BMP support all together since it is not a preferred format for iOS development.
#13
09/15/2011 (12:19 pm)
Fixed in 1.5. BMP support is now deprecated, BMP's cannot be used at all.