Currently I am adding images into cells (effectively replacing the UltraValidator) but I've run into some problems with the image format and so forth.My question is: Which format does my image need to be in to be used in a cell? Dimensions? And what encoding should I use? ie) A .bmp may be saved in R5 G5 B5 or R8 G8 B8 etc
Here's a nice clear, concise image we are familiar with.
.
Here's an example of what my images appear as.. and yes I did add an alpha layer which doesn't seem to be working.
Hi,
rzabransky said:Which format does my image need to be in to be used in a cell? Dimensions? And what encoding should I use? ie) A .bmp may be saved in R5 G5 B5 or R8 G8 B8 etc
It makes no difference to the grid. If you are using a DrawPhase, then I assume that means you are using a DrawFilter and just setting the Image property on the drawParams.AppearanceData.Image property. This property is of type System.Drawing.Image. How you get that image or from what format it comes are all part of the DotNet Framework and has nothing to do with the grid.
As for Alpha channels, the last I heard, there is no support for them in the DotNet Framework. They do support transparency in an image, but once again, that's nothing to do with the grid, it's part of the Image itself. So you will need to check Microsoft's documentation for details on that. Personally, I have used the MakeTransparent method, myself, and it works well.
Regarding the size of the image, that's entirely up to you and the size (mainly the height) of your grid rows. If you want bigger images, make the grid rows bigger. If you just want to make your image fit the existing grid row, then you could use the size of the ImageUIElement as your guide.
Mike Saltzman said:It makes no difference to the grid. If you are using a DrawPhase, then I assume that means you are using a DrawFilter and just setting the Image property on the drawParams.AppearanceData.Image property.