archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • MimeOLE V6 00 2600 0000 NNTP Posting Host 80 139 103 156 Message ID X Trace newsgroups borland com 1044612979 80 139 103 156 7 Feb 2003 02 16 19 0800 Path newsgroups borland com not for mail Xref newsgroups borland com borland public kylix graphics 1139 I get the first pixel address using TBitmap ScanLine 0 250 millisec spent then I run my MMX mix procedure 30 millisec spent

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2003/0207.txt (2016-02-14)
    Open archived version from archive



  • bitmap image is different Is this a bug in the bitmap component Also when saving in 16 and 15 bit formats the bitmap compression field in the header is set to 3 although the bitmap data is not compressed In addition in 15 16 bit format there is a 12 byte gap in between the header and the start of the bitmap whereas in 24 bit mode there is no gap Here s how it meant to works in graphics pas 1 When it loads a 16 bit uncompressed bitmap it calls it pf15Bit That s fair enough an RGB 16 bit bitmap uses 5 bits for red 5 for blue and 5 for green The other bit is unused 2 When it loads a RLE compressed 16 bit bitmap that has 5 bits for red 6 bits for green and 5 bits for blue it calls it pf16Bit 3 Any other RLE or other compressed 16 bit bitmap it calls pfCustom 4 If you create a pf16Bit bitmap and save it when you load it again it will still be a pf16Bit bitmap That all workds OK 5 If you create a pf15Bit bitmap and save it when you load it again it will probably be pfCustom Here s why In CopyBitmap in graphics pas it calls CreateDIBSection specifying the correct pixel format compression etc It then fills in the bits in the newly created DIB section from the old bitmap with GetDIBits Finally it throws away everything it knows about the bitmap except the handle that was returned in CreateDIBSection and gets it all again with a call to GetObject It has to do this to guarantee that the data it s got on the bitmap matches the handle And this data returned is in an incorrect format

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0409a.txt (2016-02-14)
    Open archived version from archive

  • efg's Image Processing -- Single Bit Bitmaps
    0101 END END ImageBits Picture Graphic Bitmap FINALLY Bitmap Free END end Note that after the TBitmap is created its Width and Height must be specified before the PixelFormat If not the pf1bit bitmap will display only in black This pf1bit Scanline Enigma was described in a UseNet Post When the Define Palette checkbox is checked a two color palette is attached to the bitmap before the scanlines are defined The GetTwoColorPalette function is defined by the brush colors of the two TShapes The colors of these TShapes can be changed using the TColorDialog by clicking on either of them Based on 6 Feb 1999 post to borland public delphi graphics by David Ullrich in UseNet Post FUNCTION TFormPf1bit GetTwoColorPalette hPalette VAR Palette TMaxLogPalette BEGIN Palette palVersion 300 Palette palNumEntries 2 WITH Palette palPalEntry 0 DO BEGIN peRed GetRValue ShapeZero Brush Color peGreen GetGValue ShapeZero Brush Color peBlue GetBValue ShapeZero Brush Color peFlags 0 END WITH Palette palPalEntry 1 DO BEGIN peRed GetRValue ShapeOne Brush Color peGreen GetGValue ShapeOne Brush Color peBlue GetBValue ShapeOne Brush Color peFlags 0 END RESULT CreatePalette pLogPalette Palette END GetTwoColorPalette The Black 0 White 1 and Stripes buttons all call the same method ButtonTagFillClick The tag field of these buttons define the fill value for each byte in the pf1bit Scanline The g Arrow and Smiley buttons all call separate methods that define the Scanlines with constants Both the g and the arrow bitmaps are defined as a CONST ARRAY 0 31 0 3 OF BYTE These arrays are transferred to a pByteArray Scanline to create a pf1Bit bitmap Here s the constant definition for the Arrow array CONST The arrow bitmap was adapted from the LaserJet IIP Printer Tech Ref Manual Arrow ARRAY 0 31 0 3 OF BYTE 0 00 00 80 00 00000000 00000000 10000000 00000000 1 00 00 C0 00 00000000 00000000 11000000 00000000 2 00 00 E0 00 00000000 00000000 11100000 00000000 3 00 00 F0 00 00000000 00000000 11110000 00000000 4 00 00 F8 00 00000000 00000000 11111000 00000000 5 00 00 FC 00 00000000 00000000 11111100 00000000 6 00 00 FE 00 00000000 00000000 11111110 00000000 7 00 00 FF 00 00000000 00000000 11111111 00000000 8 00 00 FF 80 00000000 00000000 11111111 10000000 9 FF FF FF C0 11111111 11111111 11111111 11000000 10 FF FF FF E0 11111111 11111111 11111111 11100000 11 FF FF FF F0 11111111 11111111 11111111 11110000 12 FF FF FF F8 11111111 11111111 11111111 11111000 13 FF FF FF FC 11111111 11111111 11111111 11111100 14 FF FF FF FE 11111111 11111111 11111111 11111110 15 FF FF FF FF 11111111 11111111 11111111 11111111 16 FF FF FF FF 11111111 11111111 11111111 11111111 17 FF FF FF FE 11111111 11111111 11111111 11111110 18 FF FF FF FC 11111111 11111111 11111111 11111100 19 FF FF FF F8 11111111 11111111 11111111 11111000 20 FF FF FF F0 11111111 11111111 11111111 11110000 21 FF FF FF E0 11111111 11111111 11111111 11100000 22 FF FF FF C0 11111111 11111111

    Original URL path: http://www.efg2.com/Lab/ImageProcessing/pf1bit.htm (2016-02-14)
    Open archived version from archive


  • 10 Grid Width Grid Height Based on observations in the Very Large Bitmap experiment http www efg2 com Lab Graphics VeryLargeBitmap htm I defined a bitmap s PixelFormat before its height and width since sometimes larger bitmaps could be created this way Before that experiment I wasn t really consistent in the order in which I defined a bitmap s properties HOWEVER this order causes some sort of problem with

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1013a.txt (2016-02-14)
    Open archived version from archive


  • INTEGER row pByteArray each pixel is a nibble that is a half byte begin Bitmap TBitmap Create TRY Bitmap Width Image1 Width Bitmap Height Image1 Height Should be multiple of 16 Bitmap PixelFormat pf4bit 16 colors FOR j 0 TO Bitmap Height 1 DO BEGIN m j DIV 16 16 bands 0 15 row Bitmap Scanline j FOR i 0 TO Bitmap Width DIV 2 1 DO 2 pixels per

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/Graphics/pf4bit.Txt (2016-02-14)
    Open archived version from archive

  • efg's Cycle Colors Lab Report
    displayed briefly Click on the Create Fractals button The creation of the fractal may take as long as five minutes An estimate of the time remaining will be displayed below the image while the fractal is being created This is linear extrapolation based on the number of ScanLines already processed and the number remaining Click on the Cycle Colors checkbox to start the background color cycling Color cycling will continue until the program is exited Notice that sometimes the color cycling will slow as Windows has other demands for processing time Discussion Historically color cycling was done with hardware assistance by shifting palette colors With increasingly fast processors color cycling is now possible in software even with 24 bit color Palettes don t exist with 15 bit or above color displays The Windows AnimatePalette function cannot be used in high color or true color modes for color cycling CycleColorsMap EXE takes 75 Fractint color maps from Fractint and Jacco s web sites with 18 554 RGB triples to display the same fractal biomorph The program reads all the MAP files in the directory with the EXE and displays the 16 by 16 matrix of colors for each map before creating the fractal and cycling colors CycleColors EXE takes five sets of 256 colors 256 shades of red 256 shades of green 256 shades of blue 256 fire storm colors and 256 shades of gray and cycles through them as part of the IdleAction when the Cycle Colors checkbox is checked A new image is created from the base image and the array of TRGBTriple s to update the display Read Maps uses FindFirst FindNext FindLast to locate and read all MAP files in the directory of where the EXE is located Note that many of these color maps do not

    Original URL path: http://www.efg2.com/Lab/Graphics/Colors/CycleColors.htm (2016-02-14)
    Open archived version from archive


  • Bitmap8 PixelFormat pf8bit THEN ShowMessage Expecting 8 bits pixel BMP IF Bitmap8 Palette 0 THEN ShowMessage No Palette with BMP ELSE BEGIN PaletteEntryCount GetPaletteEntries Bitmap8 Palette 0 255 LogicalPalette palPalEntry FOR i 0 TO PaletteEntryCount 1 DO BEGIN Memo1 Lines Add Format 3 3d 3 3d 3 3d 3 3d d i LogicalPalette palPalEntry i peRed LogicalPalette palPalEntry i peGreen LogicalPalette palPalEntry i peBlue LogicalPalette palPalEntry i peFlags END Bitmap24

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/Graphics/GetPaletteEntries.txt (2016-02-14)
    Open archived version from archive


  • Hi I m trying to write a program that will extract graphics data from a game The data is stored in a propriotry format which I am able to read Since the game in question has a palette of 256 colours I want to be able to extract any images to a 256 colour bitmap To do this I have created a form with a 64x64 pixel TImage on it I can extract the data and plot it by using TImage Canvas Pixels x y pixel value 0 255 Pixels is slow Scanline is usually better Here s what I suggest Create an in memory TBitmap the size you need Set the Bitmap s height width and PixelFormat pf8bit Define a TMaxLogPalette structure and define the 256 color palette you want Be aware that you can create a TBitmap with a 256 color palette but you will have problems if you try to display such a TBitmap in 256 color mode Doesn t make any sense In 256 color mode Windows reserves 20 colors for the display of buttons panels etc In high color or true color display mode you can see all 256 colors in your palette Assign the Bitmap Palette using the CreatePalette API call After defining the palette fill in the scanlines with the data you have Once you ve defined your bitmap save it to a file or display it in a TImage Here s an example that hopefully will get you started procedure TForm1 ButtonGraysClick Sender TObject TYPE TByteArray ARRAY WORD OF BYTE pByteArray TByteArray VAR Bitmap TBitmap i INTEGER j INTEGER NewPalette TMaxLogPalette row pByteArray begin Bitmap TBitmap Create TRY Bitmap PixelFormat pf8bit Create bitmap same size as TImage could be any size Bitmap Width Image1 Width Bitmap Height Image1 Height Define 256 shades

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2002/0719.txt (2016-02-14)
    Open archived version from archive



  •