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".

  • User Newsgroups borland public delphi graphics function GetBitmapFromField field TGraphicField TBitmap begin Result TBitmap Create try Result Assign field except Result nil end end With best regards Mike Shkolnik FIDO 2 463 106 14 E Mail mshkolnik rs ukraine kiev ua mike woccu freenet kiev ua WEB http www geocities com SiliconValley Grid 3989 sdente1 ÐÉÛÅÔ ÓÏÏÂÝÅÎÉÉ I have an application where I need to load an Bitmap stored in

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



  • Assign Bitmaps 2 Force BitmapAlign to be totally independent of Bitmaps 2 This is an unfortuante kludge needed if Scanline is the only method to access pixel data Without this kludge the original bitmap and new bitmap are operating on

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


  • Files Borland Shared Images Splash 256color factory bmp Bitmap SaveToClipBoardFormat MyFormat AData APalette ClipBoard SetAsHandle MyFormat AData finally Bitmap Free end end Why doesn t this example have the needed uses statement FWIW there are other Help examples that don t show which units are needed this is quite frustrating USES clipbrd With the needed uses this code doesn t compile The following error is seen Error Unit1 pas 38 Types of actual and formal var parameters must be indentical I d guess a novice might not know to change AData APalette THandle to AData THandle APalette hPalette In D6 help you don t need to ignore the C example but the same problem exists The syntax is correct in help but the code in the example doesn t compile and must be changed and the uses must be added too D5 has the same problem as D6 In D4 the same problem existed The relative path seems to be wrong on my D4 installation since files were moved to C Program Files Commons Files Borland Bitmap LoadFromFile Images Splash 256color factory bmp Needed to be Bitmap LoadFromFile C Program Files Common Files Borland Shared Images Splash 256Color factory bmp The D3 online help said this as does the D7 online help procedure SaveToClipboardFormat var AFormat Word var AData THandle var APalette HPALETTE override The D3 Code compiled and executed since back then a THandle and a hPalette must have been equivalent USES Clipbrd Missing in D3 and later Help example procedure TForm1 Button1Click Sender TObject var MyFormat Word Bitmap TBitMap AData APalette THandle compiles OK in D3 but not D4 D5 D6 D7 begin try Bitmap TBitmap Create Bitmap LoadFromFile C Program Files Borland Delphi 3 Images Splash 256color factory bmp Bitmap SaveToClipBoardFormat MyFormat AData APalette ClipBoard SetAsHandle MyFormat

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


  • back I read a post where someone explained how to get the dimensions of a bitmap just by reading the header in the file instead of assigning it to a TBitmap and accessing the properties width and height The function return False if the file is not a bitmap function GetBitmapDimension const AFilename String var AWidth AHeight Integer Boolean var f TFileStream bfh TBitmapFileHeader HeaderSize DWord w Word begin Result

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


  • should work for a BMP procedure TForm1 Button1Click Sender TObject VAR FileStream TFileStream InfoHeader TBitmapInfoHeader FileStream Seek SizeOf TBITMAPFILEHEADER soFromBeginning FileStream Read InfoHeader SizeOf InfoHeader This code will work only under some circumstancs Of course it is best to read the file header to check to see if the file is a bitmap file Next and most important a bitmapinfoheader does not always follow the file header In fact it

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


  • Another Netscape Collabra Server User Newsgroups borland public delphi graphics TBitmap supports RLE encoded BMP files We leave the RLE decoding to the video driver to figure out so that could be your problem Danny D Filion wrote in article

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


  • means that you ll get a Stream Read Error if you try and load a RLE bitmap into a TImage for example This is down to a bug in graphics pas where the line RLEStream Seek ImageSize soFromEnd in TBitmap ReadDIB should say RLEStream Seek ImageSize soFromEnd Thanks to various others for documenting this fix This is easy enough to change and putting the modified graphics pas into my lib

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


  • functions The palette of this kind of DIB is specified at the time CreateDIBSection is called and may be modified using SetDIBColorTable This is what TBitmap does It must do so because it associates a Canvas with the bitmap so it must be able to use GDI to draw on it The second kind of DIB has no handle so you can t draw on it with GDI You allocate the memory for the image data and header including the palette yourself You draw it using StretchDIBits Since you have a pointer to the palette entries you can modify them without a function call Unlike the CreateDIBSection method this technique was around in Win16 It is still perfectly acceptable to use it it is NOT obsolete The main difference is that a DIB section has a handle while a DIB doesn t People myself included often write DIB when it would be more correct to write DIB section The image data has the same format for both kinds of DIBs In your case the main advantage would be pointer access to the palette I m not so sure that calling SetDIBColorTable with Bitmap Canvas Handle is a big performance problem so I recommend sticking to that technique You don t need to create read and write the entries each time you want to set them Just keep your pallete entries an array of RGBQUAD structures around When you want to change the palette just modify the RGBQUADs and call SetDIBColorTable once I would avoid the Palette property if you want to rapidly change the palette entries If you ever want to draw on the DIB using a Canvas rather than addressing each pixel you should stick with TBitmap On Wed 10 Mar 1999 06 37 48 0800 Charles Bond wrote

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



  •