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".
  • efg's ShowDemoOne Lab Report
    file is included for test purposes Check and uncheck the Use Optimized Palette checkbox to see the difference between an optimized palette and the Windows halftone palette Select the Palette Tabsheet at any time to view the palette being use to display the image Note the location of the 20 fixed Windows palette entries The palette is displayed in a paintbox Discussion After an image is loaded using LoadFromFile the optimized palette is attached to the bitmap With only a single image Delphi takes care of the WMQueryNewPalette and WMPaletteChanged messages automatically Run multiple copies with different images to test this This Delphi 3 example implements the Gervautz Purgathofer Octree Color Quantization algorithm as described in Jeff Prosise s Wicked Code Microsoft Systems Journal October 1997 pp 79 84 Download the C code PalGenCode and take a look at it Optimized palettes are not needed for high color or true color displays Look at the function TColorQuantizer ProcessImage and its routine ProcessLowBitDIB for an idea about how to simulate Scanline in Delphi 2 using the GetDIBits API call Also take a look at palette optimization in Anders Melander s TGIFImage To count the actual number of colors RGB Triples in

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



  • 00 2314 1300 Organization Another Netscape Collabra Server User X MSMail Priority Normal Reply To Paul Nicholls Newsgroups borland public delphi graphics Hi all I was wondering if I wanted to store the pointers to some ScanLines from a bitmap into some variables when would I have to update these variables to have the pointers be valid again I assume they would have to change when the bitmap size format

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


  • Reply To pandeng telepath com Newsgroups borland public delphi graphics On Wed 11 Aug 1999 09 50 44 1000 Paul Nicholls wrote Hi all I was wondering if I wanted to store the pointers to some ScanLines from a bitmap into some variables when would I have to update these variables to have the pointers be valid again I don t think it s ever really safe to keep a

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


  • Posting Host 208 186 37 169 X Trace dnews 990837580 208 186 37 169 25 May 2001 17 39 40 0700 Lines 42 Path dnews Xref dnews borland public delphi graphics 39202 I don t believe it TBitmap Dormant I ve been using Kodak s Photostyler forever won t open a Delphi bitmap most of the time I ve tried a hundred ways to fix it over the years and was working on a project an hour ago where the problem came up My work around had been to not use the offending pixel formats It s been driving me nuts since about a week after D 1 was released this fixed it finally It s sooo simple Many thanks Gary Peter Haas wrote Hi Ian Ian wrote in I have a program in which the user can create bmp files from bitmaps created by the program I have set the pixel format to 24 bit I think this is the cause However one user has reported that PhotoEditor cannot read the file whilst all their other programs can I don t have PhotoEditor There is a problem with any Delphi versions fixed in Delphi5 TBitmap save additionally the palette

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


  • is the FREEIMAGE procedure s secret If it doesn t used i think bitmaps are mixed If you assign the same bitmap to 2 TBitmaps they will both point to the same one bitmap in memory They are reference counted like strings If you then use Scanline you get a pointer to the bitmaps And since both Scanline pointers point to the same bitmap modifiyng one bitmap using the Scanline

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


  • P1 P2 P3 Pointer bytes Integer register assembler P1 eax P2 edx P3 ecx bytes ebp 8 asm push ebx push esi push edi mov edi ecx mov esi eax mov ecx ebp 8 test ecx ecx jz Quit and ecx 4294967288 ecx bytes bytes mod 8 jz NoQWORDs add edx ecx Move pointers to the end minus bytes mod 8 add esi ecx add edi ecx shr ecx 3 ecx bytes div 8 the amount of QWORDs to process neg ecx Pointer ecx 8 now points to the start LoopQWORDs db 0F 6F 04 CE movq mm0 qword ptr esi ecx 8 db 0F EF 04 CA pxor mm0 qword ptr edx ecx 8 db 0F 7F 04 CF movq qword ptr edi ecx 8 mm0 inc ecx jnz LoopQWORDs NoQWORDs mov ecx ebp 8 and ecx 7 ecx bytes mod 8 jz Quit xor ebx ebx LoopBYTEs mov al esi ebx Process the remaining bytes xor al edx ebx mov edi ebx al inc ebx cmp ebx ecx jnz LoopBYTEs Quit pop edi pop esi pop ebx end procedure EMMS assembler asm db 0F 77 emms end procedure mmx xor bitmaps Source1 Source2 Dest TBitmap Probably garbles 16th bit pf15bit or 4th byte pf32bit var bpp bits bytes y Integer begin if Source1 Width Source2 Height then raise Exception Create mmx xor bitmaps Source bitmaps are not the same size if Source1 PixelFormat raise Exception Create mmx xor bitmaps Source bitmaps pixelformats different case Source1 PixelFormat of These behave differently than Windows don t know how exactly how why pf1bit bpp 1 pf4bit bpp 4 pf8bit bpp 8 These should be the same as Windows pf15bit bpp 16 They re aligned on WORDs anyway pf16bit bpp 16 pf24bit bpp 24 pf32bit bpp 32 else raise Exception Create mmx

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


  • handle API code and works almost the same try GetDIBits SetDIBits you will be astonished how things will speed up If i would have used Getdibits so many times in my application as i used scanline now i would be crazy certainly not Ok here goes trivial example no error checking etc unit SimpleDIBits interface uses Windows Graphics type TColorRec packed record b g r a Byte end TColorArray array 0 MaxInt div SizeOf TColorRec 1 of TColorRec PColorArray TColorArray function BmpToArray const aBitmap TBitmap PColorArray procedure BmpFromArray var aBitmap TBitmap p Pointer w h Integer var bmi BITMAPINFO implementation function BmpToArray const aBitmap TBitmap PColorArray var w h Integer p PColorArray begin w aBitmap Width h aBitmap Height GetMem p w h SizeOf TColorRec with bmi bmiHeader do begin biWidth w biHeight h end GetDIBits aBitmap Canvas Handle aBitmap Handle 0 h p bmi DIB RGB COLORS Result p end procedure BmpFromArray var aBitmap TBitmap p Pointer w h Integer begin aBitmap Height 0 aBitmap Width w aBitmap Height h with bmi bmiHeader do begin biWidth w biHeight h end SetDIBits aBitmap Canvas Handle aBitmap Handle 0 h p bmi DIB RGB COLORS end initialization with bmi bmiHeader do

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

  • efg's Graphics -- Daisy Lab Report
    program The 640 by 480 pixel image appears on the screen with 1024 daisy points as shown above Check or uncheck the R G or B checkboxes to see the various color planes in the image Press the Write BMP button to save a 1024 by 768 pixel bitmap If the Blue checkbox is checked the file Daisy BMP will contain 3000 daisy points Press the Print button to create a 2000 by 1500 pixel 24 bit bitmap in memory If the Blue checkbox is checked the image will have 12 000 daisy points The Image is printed at a specified location on a sheet of paper in landscape orientation Discussion The Daisy image especially when printed with only the blue plane is quite a Moiré pattern when printed on a HP LaserJet 5 or equivalent The ImageProcessingPrimitives PAS unit defines the TYPEs TRGBTripleArray and pRGBTripleArray which are very useful for working with 24 bit color bitmaps The DrawDaisy procedure shows how to use one routine to draw on any canvas The PrintBitmap routine in this unit uses the StretchDIBits API call to properly print the image on any color printer See Split in Image Processing to break this image

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



  •