BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 01-28-2009, 12:03 PM   #1 (permalink)
New Member
Join Date: Dec 2008
Model: 8310
Carrier: Cellcom
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Cool BBThumbs.dat

Please Login to Remove!

Hi All,
I've code that converts JPG to thumbnails. The problem is sometime picture is too big to process in memory, and I've out of memory exception.
I've noticed there a file called BBThumbs.dat in Blackberry picture folder, and I wonder if I can display it instead making thumbs from all pictures manually.
How can I import BBThumbs.dat into my program?

Please help,
Old 01-29-2009, 05:07 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
Join Date: Apr 2008
Location: Germany, BW
Model: -
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts

I looked at the format of that file some time ago and here is what I think about it.

It contains a sequence of thumbnails in PNG format. The .dat file contains a RIM's own header (first 37 Byte) and footer (last 41 Byte).

After the header begins the PNG signature: 89h 50h 4Eh 47h 0Dh 0Ah 1Ah 0Ah
Each png contains 3 CHUNKs: IHDR, IDAT, IEND
The end of the PNG file is right after the IEND Chunk: AEh 42h 60h 82h

after it follwos again the header and the signature of the next png thumbnail.

So it should be quite easy to write a parser for it to extract all thumbnails (or one specific). I don't know what kind of information is contained in RIM's header, but the most important would be the file name which is readable.

If you write a parser for it, I would be happy to see your code here
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)

Last edited by Ivanov : 01-29-2009 at 05:11 AM.

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.