LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> [Wiki] Flattened pixmap
Ton
post Sep 3 2007, 10:49 AM
Post #1


CCT It
*****

Premium Member
Posts: 1337
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


This is the discussion topic for the wiki article: Flattened pixmap


--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Sep 3 2007, 10:49 AM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Ton
post Sep 3 2007, 11:49 AM
Post #2


CCT It
*****

Premium Member
Posts: 1337
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


QUOTE (tcplomp @ Sep 3 2007, 12:49 PM) *
This is the discussion topic for the wiki article: Flattened pixmap

When is the 32 bit value added?

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
eaolson
post Sep 3 2007, 03:18 PM
Post #3


Extremely Active
****

Member
Posts: 269
Joined: 15-September 05
Member No.: 3014
Using LabVIEW Since:1998
LV:7.1.1 ,8.0.1 ,8.20
United States us_texas us_illinois


QUOTE (tcplomp @ Sep 3 2007, 06:49 AM) *
When is the 32 bit value added?

What do you mean? Added to what?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ton
post Sep 3 2007, 03:33 PM
Post #4


CCT It
*****

Premium Member
Posts: 1337
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


QUOTE (eaolson @ Sep 3 2007, 05:18 PM) *
What do you mean? Added to what?

The wiki entry states:
QUOTE
Image depth describes the bit depth of the colors in the image. It's value affects how the image and colors elements are interpreted. Valid values are: 1, 4, 8, 24, and 32. It is a U8


But I can't find anywhere (webhelp from NI up to 8.5) about this 4 byte image depth.

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
eaolson
post Sep 5 2007, 09:06 PM
Post #5


Extremely Active
****

Member
Posts: 269
Joined: 15-September 05
Member No.: 3014
Using LabVIEW Since:1998
LV:7.1.1 ,8.0.1 ,8.20
United States us_texas us_illinois


QUOTE (tcplomp @ Sep 3 2007, 10:33 AM) *
But I can't find anywhere (webhelp from NI up to 8.5) about this 4 byte image depth.

You're right, it doesn't seem to be mentioned in the help. A 32 bit image is just a 24 bit image with transparency. In a 24-bit image, the image array is 3 bytes, stored in [R, G, B, R, G, B...] order. For a 32 bit image, it's the same, just with an alpha channel: [A, R, G, B, A, R, G, B...] If you open up some of the picture functions (e.g. Draw Flattened Pixmap), you can see NI is handling the 32-bit case. I think only PNGs work with transparency in LabVIEW. Windows XP introduces a BMP with transparency, but I don't know if LabVIEW handles that case. JPGs don't do transparency.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
neB
post Sep 5 2007, 09:47 PM
Post #6


Certified Kool-Aid Kid
*****

Premium Member
Posts: 1160
Joined: 6-December 02
From: Pittsburgh PA USA
Member No.: 29
Using LabVIEW Since:1998
LV:7.1 ,. ,.
United States Germany Nothing Selected


QUOTE (tcplomp @ Sep 3 2007, 11:33 AM) *
The wiki entry states:


But I can't find anywhere (webhelp from NI up to 8.5) about this 4 byte image depth.

Ton



Just a guess...

Before monitors were VGA there were CGA that offered a whole 16 colors, any four of which could used at any time. wink.gif

Like I said, just a guess.

Anyone have eperience in LabVIEW with four bit colors?

Ben


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
eaolson
post Sep 6 2007, 12:45 AM
Post #7


Extremely Active
****

Member
Posts: 269
Joined: 15-September 05
Member No.: 3014
Using LabVIEW Since:1998
LV:7.1.1 ,8.0.1 ,8.20
United States us_texas us_illinois


QUOTE (Ben @ Sep 5 2007, 04:47 PM) *
Just a guess...

Before monitors were VGA there were CGA that offered a whole 16 colors, any four of which could used at any time. wink.gif

Like I said, just a guess.

Anyone have eperience in LabVIEW with four bit colors?

Ben


Interesting suggestion, but I kind of doubt it. The image array is an array of bytes, not bits and I doubt CGA applications cared much about transparency. smile.gif A four-bit depth image is an indexed image. Rather than store the color information for each pixel like in a 24-bit image, the image array stores the index into the colors array, where the actual colors are stored as U32s. In the flattened pixmap, the only real difference between a 1-bit, 4-bit, and 8-bit image is the length of the colors array (i.e. the size of the color palette).


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ton
post Sep 6 2007, 06:44 PM
Post #8


CCT It
*****

Premium Member
Posts: 1337
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


The reason I started this thread is because the Wiki makes a false statement (which I will remove) that the Pixmap support 4 byte color information

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
eaolson
post Sep 6 2007, 10:18 PM
Post #9


Extremely Active
****

Member
Posts: 269
Joined: 15-September 05
Member No.: 3014
Using LabVIEW Since:1998
LV:7.1.1 ,8.0.1 ,8.20
United States us_texas us_illinois


QUOTE (tcplomp @ Sep 6 2007, 01:44 PM) *
The reason I started this thread is because the Wiki makes a false statement (which I will remove) that the Pixmap support 4 byte color information

I added the 32 bit back in. You can have 4 byte images, and 32 is a valid entry in the image depth element. It's not mentioned in the help, but the 32 bit case is handled by the picture VIs. A 32 bit (4 byte) image is the special case where you have image consisting of RGB color data and alpha channel (transparency). So in some cases, the image array will consist of sequences of four bytes.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rolfk
post Sep 8 2007, 03:00 PM
Post #10


<customize this text>
*****

Premium Member
Posts: 1012
Joined: 9-April 04
From: Rotterdam
Member No.: 349
Using LabVIEW Since:1992
LV:8.5.1 ,8.2.1 ,7.1.1
Netherlands Switzerland Nothing Selected


QUOTE (eaolson @ Sep 5 2007, 07:45 PM) *
Interesting suggestion, but I kind of doubt it. The image array is an array of bytes, not bits and I doubt CGA applications cared much about transparency. smile.gif A four-bit depth image is an indexed image. Rather than store the color information for each pixel like in a 24-bit image, the image array stores the index into the colors array, where the actual colors are stored as U32s. In the flattened pixmap, the only real difference between a 1-bit, 4-bit, and 8-bit image is the length of the colors array (i.e. the size of the color palette).


CGA was 16 colors resulting in 4 BITs per pixel. Those were depending on the format actually packed directly into the bitmap with two pixels per bytes. Windows Bitmaps however always store bit depts of 8 bit and smaller as a palette with indeces, since they do always assume an RGB value as color.

The other thing discussed here are 4 BYTE or 32 bit bitmaps. While NI never really documented that, the Picture control was able to handle 32 bit (where it really simply ignores the 4th byte) bitmaps since the early days of this control. The Picture control VI functions didn't support that in the beginning but I had modified them myself and that worked correctly even in LabVIEW 4 in a picture control.

Rolf Kalbermatter


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 2nd December 2008 - 03:24 PM