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

  • a large number of bitmaps from 24 bit to 8bit and save tme back to file I ve found the TImage Pixelformat method but the new palette it creates is all wrong How can I change my palette or create and use a customized one The code below which uses the ColorQuantizationLibrary contained in Earl F Glynn s Color Quantization Demo available from http www efg2 com Lab Graphics Colors

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



  • hue HLSMAX div 12 div HLSMAX div 6 else if hue HLSMAX div 2 then result n2 else if hue HLSMAX 2 div 3 then result n1 n2 n1 HLSMAX 2 div 3 hue HLSMAX div 12 div HLSMAX div 6 else result n1 end procedure iHLSToRGB hue lum sat Integer var r g b Integer var Magic1 Magic2 Integer begin if sat 0 then begin r lum RGBMAX div

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


  • graphics On Thu 18 Mar 1999 10 22 42 0100 Marco De Toni wrote Does anybody tell me a more accurated way to convert CMYK to RGB and viceversa es like Adobe Photoshop I m going to assume that your RGB values range from 0 to 255 and your CMYK values range from 0 to 100 RGB CMYK C 100 Round 100 R 255 M 100 Round 100 G 255

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


  • some code that uses the CIE s L a b system to provide a color coordinate system that does a much better job of matching the response of the human visual system To use the code take your original RGB value then divide each value by 255 so that the resulting numbers range from 0 0 to 1 0 Now feed these values to the RgbToLab function This converts the RGB coordinates to LAB coordinates where the first coordinate L is scaled from 0 to 100 So now you can modify that L value to change the brightness of the color then feed the new LAB values to LabToRgb to convert back to RGB Finally multiply each of the final result values by 255 and round to the nearest integer unit uLabRgb interface type TVector3 array 1 3 of Double function LabToRgb Lab TVector3 TVector3 function RgbToLab Rgb TVector3 TVector3 implementation type TMatrix3 array 1 3 1 3 of Double const RgbXyz TMatrix3 1 0 0 0 1 0 0 0 1 XyzRgb TMatrix3 1 0 0 0 1 0 0 0 1 CCIR recommended values PhosphorX TVector3 0 64 0 30 0 15 PhosphorY TVector3 0 33 0 60 0 06 WhitePoint TVector3 0 95 1 0000 1 09 Gamma Double 1 0 45 function MultiplyMatrix3ByVector3 const M TMatrix3 const V TVector3 TVector3 var I Integer J Integer begin for I 1 to 3 do begin Result I 0 0 for J 1 to 3 do Result I Result I M I J V J end end function MultiplyMatrix3ByMatrix3 const M1 M2 TMatrix3 TMatrix3 var I Integer J Integer K Integer begin for I 1 to 3 do for J 1 to 3 do begin Result I J 0 0 for K 1 to 3 do Result I J

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


  • Section A Color Information at www efg2 com Lab Library Color htm efg Earl F Glynn Overland Park KS USA unit yuv read interface uses Windows Messages SysUtils Classes Graphics Controls Forms Dialogs StdCtrls ExtCtrls type TFormYUVRGB class TForm ButtonRead TButton ImageYUV TImage CheckBoxBW TCheckBox procedure ButtonReadClick Sender TObject private Private declarations public Public declarations end var FormYUVRGB TFormYUVRGB tosiz integer 0 implementation R DFM procedure TFormYUVRGB ButtonReadClick Sender TObject CONST YUVwidth 720 YUVheight 486 TYPE TYUVWord A Word is always 2 byte in all versions of Delphi RECORD UV BYTE U if index even V if index odd Y BYTE Y for all array elements END TRGBArray ARRAY 0 YUVwidth 1 OF TRGBTriple pRGBArray TRGBArray VAR BitmapRGB TBitmap BufferYUV ARRAY 0 YUVwidth 1 OF TYUVWord FilePointer INTEGER Flag BOOLEAN i INTEGER j INTEGER Row pRGBArray StreamYUV TFileStream U INTEGER V INTEGER Y INTEGER This may be overkill Check upper and lower bounds to be safe FUNCTION FixValue CONST x DOUBLE BYTE VAR i INTEGER BEGIN i ROUND x IF i 255 THEN RESULT 255 ELSE IF i 0 THEN RESULT 0 ELSE RESULT BYTE i END FixValue begin StreamYUV TFileStream Create texmex yuv fmOpenRead TRY FilePointer 0 StreamYUV Seek FilePointer soFromBeginning flag CheckBoxBW Checked slow to access visual component BitmapRGB TBitmap Create TRY BitmapRGB Width YUVwidth BitmapRGB Height YUVheight BitmapRGB PixelFormat pf24Bit FOR j 0 TO YUVheight 1 DO BEGIN StreamYUV Read BufferYUV SizeOf BufferYUV Row BitmapRGB Scanline j FOR i 0 TO YUVwidth 1 DO BEGIN Don t try to optimize this for now Let s just get the assignments right IF i MOD 2 0 Even THEN BEGIN Y BufferYUV i Y U BufferYUV i UV V BufferYUV i 1 UV END ELSE BEGIN Odd Y BufferYUV i Y U BufferYUV i 1 UV V BufferYUV i

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


  • Message ID X Trace 14 Jul 2000 14 50 40 0800 195 14 226 50 Path bornews borland com dnews 195 14 226 50 David P Schwartz wrote in news 396F8267 B7DBCAE8 YEOW desertigloo com I ve got several color combos and color dialogs working in D4 here but none of them have settings to allow them to select only web friendly colors Is there a simple way to convert

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


  • well visible but funny Font Colors but fails if the background is grey Next i set Font Color to white on dark backgounds and black on bright ones But what is Brigthness R G B 3 seems to be a good value It fails because the human eye does not see all the colours in the same density Next i read something about Luminanz and created my final code function

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


  • INTEGER rowIn pRGBTripleArray BEGIN Be sure bitmap is 24 bits pixel ASSERT Bitmap PixelFormat pf24Bit Clear 2D array of TBits objects FOR j 0 TO 255 DO FOR i 0 TO 255 DO Flags i j NIL Step through each scanline of image FOR j 0 TO Bitmap Height 1 DO BEGIN rowIn Bitmap Scanline j FOR i 0 TO Bitmap Width 1 DO BEGIN WITH rowIn i DO BEGIN

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



  •