# RR,GG,BB Raw Data images

Dec 21, 2013, 13:15 (This post was last modified: Dec 21, 2013 13:48 by foxmuldr.)
Post: #16
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
I see in this example that the BMP file format I'm using, even though it's 32-bit, does not include the alpha channel data in GIMP. However, if you use the Fuzzy Select Tool with a threshold of 0 and click on the pixel between frames you'll see it pulls through the border.

I am looking at why this is. I'll upload a new version which handles the alpha channel correctly in a little while.

Update: I found out why. By default the BMP format uses BI_RGB for compression. For the 32-bit alpha channel it needed BI_BITFIELD, and then to have the alpha,red,grn,blu masks populated with their offset within the 32-bit pixel data.
Dec 21, 2013, 13:46
Post: #17
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
This version uses the RGBA file format so the bitmaps show up with the alpha border around each frame. It makes it much easier to see in GIMP. This version also includes a sample .bin file which can be processed.

Attached File(s)
Dec 21, 2013, 14:17
Post: #18
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
(Dec 21, 2013 13:46)foxmuldr Wrote:  This version uses the RGBA file format so the bitmaps show up with the alpha border around each frame. It makes it much easier to see in GIMP. This version also includes a sample .bin file which can be processed.

Hey, thanks ever so much. Sorry it's taken me a wee while to reply. Christmas shopping by order of the Mrs. I'll get on in a wee while and check out what you've done, and I'll report back to you how it goes. Once again, thank you.
Dec 21, 2013, 14:40 (This post was last modified: Dec 21, 2013 14:58 by RobbieK..)
Post: #19
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
Sorry to sound like a complete NooB, but how do I run this?

EDIT: Forget that, had a momentary blonde moment. All sorted, thanks. lol
Dec 21, 2013, 22:51 (This post was last modified: Dec 21, 2013 22:52 by foxmuldr.)
Post: #20
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
I noticed a bug. Unless you resize the preview window, it doesn't respond to the close window event. No idea why.

BTW, it would not be hard to change the preview window into an edit window where you can move frame-by-frame, clicking individual pixels to specific colors, inserting frames, copying frames, deleting frames, merging in from the directory of .BMP files as from an animated GIF, etc., and then saving out as .BMP or .BIN files.

The source code is there. If you have someone who can do that type of programming, it wouldn't take more than a few hours to include.
Dec 22, 2013, 00:39
Post: #21
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
Hiya there, only had a quick shot converting bins to bmp's via command prompt. Not really had much time to play about with it. I've dissected a gif into 307 separate bmp files, a nice scrolling text animation. So guess what I'm doing now? lol

Please excuse my ignorance, but is this just operable in command prompt or am I missing a trick in GIMP?
Dec 22, 2013, 01:00 (This post was last modified: Dec 22, 2013 01:29 by foxmuldr.)
Post: #22
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 00:39)RobbieK. Wrote:  Hiya there, only had a quick shot converting bins to bmp's via command prompt. Not really had much time to play about with it. I've dissected a gif into 307 separate bmp files, a nice scrolling text animation. So guess what I'm doing now? lol

Please excuse my ignorance, but is this just operable in command prompt or am I missing a trick in GIMP?

It's a command line utility. It converts .bin to .bmp for editing, then backward from .bmp to .bin. The source code is included. Someone who wants to add it to GIMP could add it.

Create an EDITBIN.BAT file to edit them in a sequential manner:
Code:
@echo off REM Usage:  editbin 09 20 REM This will edit the file 09.bin creating a 20-wide .BMP file. REM Convert the file from .BIN to 32-bit RGBA .BMP IF "%2"=="" goto no_wide bin2bmp -in:%1.bin -out:%1.bmp -wide:%2 goto launch_gimp :no_wide bin2bmp -in:%1.bin -out:%1.bmp REM Launch GIMP and edit, then Ctrl+E export, then quit GIMP :launch_gimp "C:\Program Files\GIMP 2\bin\gimp-2.8.exe" %1.bmp REM Convert back from .BMP into .BIN bin2bmp -in:%1.bmp -out:%1.bin
Dec 22, 2013, 01:27
Post: #23
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 00:39)RobbieK. Wrote:  I've dissected a gif into 307 separate bmp files, a nice scrolling text animation. So guess what I'm doing now? lol

Are you wanting to merge them into an existing .bin? Or create a new .bin? I could modify the bin2bmp to have the -overlay command to overlay existing frames, or -insert to insert existing frames.
Dec 22, 2013, 01:34
Post: #24
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 01:27)foxmuldr Wrote:
(Dec 22, 2013 00:39)RobbieK. Wrote:  I've dissected a gif into 307 separate bmp files, a nice scrolling text animation. So guess what I'm doing now? lol

Are you wanting to merge them into an existing .bin? Or create a new .bin? I could modify the bin2bmp to have the -overlay command to overlay existing frames, or -insert to insert existing frames.

Ideally create a new bin file. That way I can catalogue the different animations. As the SD Card Reader can only read 23 animations, inclusive of a RR.bin, GG.bin and BB.bin. I'd like to think I could have several setups for different occasions that I'd be able to change on the fly. Even create on the fly for custom requests on the display.
Dec 22, 2013, 01:38 (This post was last modified: Dec 22, 2013 01:43 by foxmuldr.)
Post: #25
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 01:34)RobbieK. Wrote:  Ideally create a new bin file. That way I can catalogue the different animations. As the SD Card Reader can only read 23 animations, inclusive of a RR.bin, GG.bin and BB.bin. I'd like to think I could have several setups for different occasions that I'd be able to change on the fly. Even create on the fly for custom requests on the display.

Are they always 11x15? Or do they vary in size?

I'll create this option:
Code:
bin2bmp -in:c:\path\to\bmp\files\pattern%03u.bmp -out:c:\path\to\file.bin -merge

This will merge in files with the name "pattern###.bmp" (as in "pattern001.bmp" through "pattern999.bmp") from the "c:\path\to\bmp\files\" directory, and creates the output file "c:\path\to\file.bin". To use a different pattern (such as "pattern1.bmp" through "pattern999.bmp") use "pattern%3u.bmp", along with other printf() format codes.
Dec 22, 2013, 01:42
Post: #26
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
They are always 11 x 15 for me at this moment in time, but, there are variations of displays that go right up to High Definition Display. I'm not quite there yet, a long way off actually. But different LED displays have slightly different resolutions. 11x15 is my current display res. But it can be varied accross the board. Depends on the individual application.
Dec 22, 2013, 01:47
Post: #27
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 01:42)RobbieK. Wrote:  They are always 11 x 15 for me at this moment in time...

Are they in .BMP format? Something like 24-bit or 32-bit RGB, or 32-bit RGBA format?
Dec 22, 2013, 01:53
Post: #28
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 01:47)foxmuldr Wrote:  Are they in .BMP format? Something like 24-bit or 32-bit RGB, or 32-bit RGBA format?

The gifs converted to bmp are currently in 24 bit. But really from GIMP, they can be converted to whatever BIT during the mass export.

All the bins I have are the same format as the one I supplied to you, the only differences being the pixel formations in each frame. So whatever you sussed the bin to be in terms of 32 BIT RGB, RGBA etc, then thats what they are. I hope I make sense. I manage to confuse myself sometimes lol
Dec 22, 2013, 01:55
Post: #29
 foxmuldr Member Posts: 65 Joined: Sep 2013 Reputation: 2
RE: RR,GG,BB Raw Data images
(Dec 22, 2013 01:53)RobbieK. Wrote:
(Dec 22, 2013 01:47)foxmuldr Wrote:  Are they in .BMP format? Something like 24-bit or 32-bit RGB, or 32-bit RGBA format?

The gifs converted to bmp are currently in 24 bit. But really from GIMP, they can be converted to whatever BIT during the mass export.

All the bins I have are the same format as the one I supplied to you, the only differences being the pixel formations in each frame. So whatever you sussed the bin to be in terms of 32 BIT RGB, RGBA etc, then thats what they are. I hope I make sense. I manage to confuse myself sometimes lol

Any of those formats is fine. If they are larger than 11x15 I will only take the upper-most 11x15 portion. If they are smaller, it will copy to the upper-left and pad with black pixels.
Dec 22, 2013, 02:01
Post: #30
 RobbieK. Junior Member Posts: 20 Joined: Dec 2013 Reputation: 0
RE: RR,GG,BB Raw Data images
It's ok, I have no plans for upgrading in the near future. The current image size is more than ideal. And I know that it looks absolutely tiny on a computer screen, however when it's 3m x 2m (meters) in size with Tri RGB Superbright LED's with 30 deg lenses, it does light up a hall. I'll post up a demo once I get the custom animations up, which means getting my head round this lol.
 « Next Oldest | Next Newest »

 Possibly Related Threads... Thread: Author Replies: Views: Last Post RAW to PNG issues with levels grandkodiak 1 331 Nov 4, 2017 23:45 Last Post: paynekj Exporting Multiple Layers Into Images (PNG, JPG, etc) SavingMultipleImages 17 11,682 Oct 6, 2014 10:59 Last Post: rich2005 Imagemagick is not compressing images like GIMP rublacava 1 569 Aug 23, 2014 08:23 Last Post: rich2005 script to extract and overlay timestamp from jps images Mark Pigott 5 1,008 Jun 18, 2014 09:46 Last Post: rich2005 Images won't export as indexed maximum411 6 851 May 29, 2014 04:10 Last Post: maximum411

Forum Jump: