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

  • take a snapshot of a TChart Canvas and save it as a GIF file You can use my TGIFImage library to do it http www melander dk delphi gifimage Like this procedure SaveCanvasAsGIF Canvas TCanvas filename string var GIF TGIFImage Bitmap TBitmap begin Bitmap TBitmap Create try Bitmap Width Canvas ClipRect Right Canvas ClipRect Left Bitmap Height Canvas ClipRect Bottom Canvas ClipRect Top Bitmap PixelFormat pf24bit Bitmap Canvas CopyRect Bitmap

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



  • public delphi graphics This procedure accepts a WMF and BMP and draws the WMF on the Bitmap The TMetafile Enhanced determines if it s EMF or WMF In this example I add comments to the metafile Look at help for TMetafileCanvas procedure TForm1 BtoE toEMF TMetafile frBmp TBitmap var ec TMetafileCanvas begin toEMF Width frbmp Width toEMF Height frbmp Height ec TMetafileCanvas CreateWithComment toEMF 0 HarmWare 2000 ec Draw 0

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


  • m Ehanced true emf m Ehanced false wmf it works for me so http perso wanadoo fr joel joly procedure TForm2 Converttoemffile1Click Sender TObject var Icon TIcon m TmetaFile mc TmetaFileCanvas b tbitmap i integer begin if LocalView Selected nil then exit m TMetaFile Create b TBitmap create try with SauveFichier do begin InitialDir repert list Directory DefaultExt EMF Filter DefaultExt DefaultExt end with LocalView do for i 0 to

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


  • for Delphi I know where it bombs and sort of why In the GetBitmap code in FIF PAS there is a combination of lines that fails First there is a GetObject that is trying to get the DIB Then there as a DecompressToBuffer DIB dsbm bmBits 0 0 0 0 RowStride The problem is that when the GetObject is called the FBitmap Handle seems to be invalid The original code was not checking for errors I changed the code to Err GetObject FBitmap Handle SizeOf DIB DIB if Err 0 then RaiseLastWin32Error This produced the message code 183 Can not create a file when that file already exists Which to me makes no sense whatsoever Then after screwing around looking through source code I tried to do type TBitmapCracker class TBitmap TBitmapCracker FBitmap HandleNeeded HandleTemp FBitmap Handle Err GetObject HandleTemp SizeOf DIB DIB I thought the HandleNeeded routine might do its work I got the same error message Then I tried type TBitmapCracker class TBitmap TBitmapCracker FBitmap PaletteNeeded HandleTemp FBitmap Handle Err GetObject HandleTemp SizeOf DIB DIB if Err 0 then RaiseLastWin32Error Surprisingly now I get a code 6 The handle is invalid That message makes more sense but how

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


  • streams have already been created procedure CompressStream inpStream outStream TStream var InpBuf OutBuf Pointer var InpBytes OutBytes integer begin InpBuf nil OutBuf nil try GetMem InpBuf inpStream size inpStream Position 0 InpBytes inpStream Read InpBuf inpStream size CompressBuf InpBuf InpBytes OutBuf OutBytes outStream Write OutBuf OutBytes finally if InpBuf nil then FreeMem OutBuf end end procedure ExpandStream inpStream outStream TStream var InpBuf OutBuf Pointer var OutBytes sz integer begin InpBuf

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


  • then do the real calculation on a pixel basis for the real result Proviso there is apparently a Palette Handle leaked when TBitmap PixelFormat pf8bit is called So you must use an Assign to a pre prepared 8 bit TBitmap E g here is some example code PLogPalette pal NULL HPALETTE hpal int i try pal PLogPalette malloc sizeof TLogPalette sizeof TPaletteEntry 256 pal palVersion 0x300 pal palNumEntries 256 for i 0 i palPalEntry i peRed random 255 pal palPalEntry i peGreen random 255 pal palPalEntry i peBlue random 255 hpal CreatePalette pal if hpal Bitmap Palette hpal finally delete pal Have a look at GetDIBColorTable example saved palettes RGBQUAD OldPalette 256 RGBQUAD NewPalette 256 get the old palette GetDIBColorTable Image1 Canvas Handle 0 256 OldPalette now munge the new palette for int i 0 i Position OldPalette i rgbBlue 255 NewPalette i rgbGreen short ScrollBar1 Position OldPalette i rgbGreen 255 NewPalette i rgbRed short ScrollBar1 Position OldPalette i rgbRed 255 SetDIBColorTable Image1 Canvas Handle 0 256 NewPalette Image1 Invalidate cache old palette GetDIBColorTable Image1 Canvas Handle 0 256 OldPalette You get the idea If you like this you can owe me a beer Dean wrote Hi I am developing

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


  • a 24 bit color image Using the technique exactly 1 786 levels of grey can be encoded and decoded The algorithm borrows from the concept of luma in that the plusses map roughly to the luma weights of the three color components To use this technique you begin with a 12 bit greyscale number The base 8 bit value for each rgb element is the 12 bit value right shifted by four Then 1 is added to none one or two of the components by examining the low order nibble of input On 2 4 blue 1 5 6 red 1 7 8 red 1 blue 1 9 10 green 1 11 13 green 1 blue 1 14 15 green 1 red 1 I don t think anyone can actually see the difference between 256 and 1786 levels of grey However without degrading the color image you preserve analytical detail which would otherwise be lost Of course you need to have started with at least 512 levels of grey to get any benefit Film and many scanners do provide data sources that might take advantage of this technique To see an implementation visit the SIHwheel below The source code for

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


  • com prodigy com enews sgi com newsfeed berkeley edu news hog berkeley edu ucberkeley cyclone bc net newsfeed bc tac net binaries vphos net Xref newsmst01 news prodigy com sci image processing 47961 The app that I am working on is an automatic Red Eye reduction tool The user will select an area that includes the red eyes and the program will find and correct them These are my observations so far I read the John Carey titbit and used his algorithm red min green blue to reduce redeye This works extremely well for green eyes however it does not work so well with brown eyes as there is quite a bit of red in brown Tends to turn brown eyes and flesh tones to green I am guessing that I will need to do some sort of eye location and then isolate the redeye Is there someway to automatically find eyes This may be delving into image processing If anyone knows any other techniques or algorithms I would be happy to try them If anybody knows where to find information such as books papers and such I would be more than happy to read them too Thanks Nathan Earl

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



  •