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

  • INTEGER jRotationAxis INTEGER jOriginal INTEGER jPrime INTEGER jPrimeRotated INTEGER RowOriginal pRGBArray RowRotated pRGBArray sinTheta DOUBLE StartTime DWORD Theta DOUBLE radians OldHeight integer OldWidth integer NewWidth integer NewHeight integer begin The size of BitmapRotated is the same as BitmapOriginal PixelFormat must also match since 24 bit GBR triplets are assumed in ScanLine Axis of rotation is normally center of image Start the clock StartTime GetTickCount Convert degrees to radians Use minus sign to force clockwise rotation Theta SpinEditThetaDegrees Value SpinEditThetaDegreesHundredths Value 100 PI 180 sinTheta SIN Theta cosTheta COS Theta OldWidth BitmapOriginal Width OldHeight BitmapOriginal Height An easy way to calculate the non clipping rectangle NewWidth abs round OldHeight sinTheta abs round OldWidth cosTheta NewHeight abs round OldWidth sinTheta abs round OldHeight cosTheta BitmapRotated Width NewWidth BitmapRotated Height NewHeight BitmapRotated PixelFormat pf24bit iRotationAxis OldWidth div 2 jRotationAxis OldHeight div 2 Step through each row of rotated image FOR j BitmapRotated Height 1 DOWNTO 0 DO BEGIN RowRotated BitmapRotated Scanline j Assume the bitmap has an even number of pixels in both dimensions and the axis of rotation is to be the exact middle of the image so this axis of rotation is not at the middle of any pixel The transformation i j to iPrime jPrime puts the center of each pixel at odd numbered coordinates The left and right sides of each pixel as well as the top and bottom then have even numbered coordinates The point iRotationAxis jRotationAxis identifies the axis of rotation For a 640 x 480 pixel image the center point is 320 240 Pixels numbered index i 0 319 are left of this point along the X axis and pixels numbered 320 639 are right of this point Likewise vertically pixels are numbered index j 0 239 above the axis of rotation and 240 479 below

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



  • PixelFormat 0 and iOriginal 0 and jOriginal 0 and iOriginalA 0 and jOriginalA OriginalBitmap Height 1 then begin Assign pixel from rotated space to current pixel in BitmapRotated RowRotated i GetSmoothColor iOriginalA jOriginalA OriginalBitmap end else begin RowRotated i rgbtRed 255 RowRotated i rgbtGreen 255 RowRotated i rgbtBlue 255 assign corner color end end end for i end for j AddCameraNumber RotatedBitmap CameraNumber ImageToChange Picture Graphic RotatedBitmap finally RotatedBitmap Free end end valid input data end Add camera number to camera image procedure AddCameraNumber RotatedBitmap TBitmap const CameraNumber Integer var CameraString string OldFont TFont StringSize TSize TextStart TPoint begin if Assigned RotatedBitmap then begin Save canvas font OldFont RotatedBitmap Canvas Font CameraString Format 3d CameraNumber Switch to small font RotatedBitmap Canvas Font Name Small Fonts RotatedBitmap Canvas Font Size 7 Get the sting size StringSize RotatedBitmap Canvas TextExtent CameraString Define the point from which start to paint the text TextStart x 16 StringSize cx div 2 if TextStart x 0 then TextStart x 0 TextStart y 16 StringSize cy div 2 if TextStart y 0 then TextStart y 0 RotatedBitmap Canvas TextOut TextStart x TextStart y CameraString Restore the font RotatedBitmap Canvas Font OldFont end end Bilinear interpolation function GetSmoothColor

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

  • efg's Reference Library: Delphi Graphics Algorithms -- Image Processing
    multiples of 90 degrees pf24bit bitmaps RotateScanLine for general rotations of pf24bit bitmaps RotatePixels slow rotation using Pixels property Single Bit Bitmaps for 90 degree pf1bit rotations Jim Hargis improved RotateBitmap that handles all the bitmap formats auto translates pf1bit pf4 bit to pf8bit all others are unchanged no corner clipping background fill is transparent Note delete EditINumber in Uses JimHargis RotateBitmap ZIP updated 12 Nov 2000 TRotateImage is a visual component derived from TGraphicControl This component similar to TImage can display graphical images on a form In addition TRotateImage can rotate image across the center of the image in any arbitrary angle http delphi icm edu pl ftp d30free rotimg zip For flood filled arrow heads or rotation of arrows or axes RotateAxes ZIP See diagram above under Arrows T G s UseNet Post with RotateBitmap code to rotate a DIB Detlef Brettschneider s E mail with rotate flip procedure Thomas Kowalski s routines that operate very quickly SpiegellnHorizontal Horizontal Mirror SpiefelLnVertikal Vertical Mirror Drehen90Grad 90 degree rotation Drehen180Grad 180 degree rotation and Drehen270Grad 270 degree rotation in his Unit7 Look at his Drehen90Grad routine for a way to use Streams and the GetDIBits API call that would be an alternative to accessing pixel data in D1 and D2 without the use of Scanline introduced in D3 Die Umsetzung für Delphi 2 funktioniert auch unter Delphi 3 und 4 Sie ist ein wenig schneller als deine Funktion Ich benutze SaveToStream um an die DIB Scanlines zu kommen und bearbeite diese http home t online de home PeterJHaas bitmap htm Wie dreht man eine Bitmap Jack Sudarev s RotateBitmap procedure that performs antialiasing Harman s UseNet Post showing Delphi code to rotate an image any angle with edge wrapping and anti aliasing Dave Shapiro s unit for rotating TBitmaps 90 180 or 270 degrees Works in D1 D2 D3 and D4 Not entirely optimized but quick enough It rotates a 1600x1200 image in 800 msec on his P2 400 www csd net daves delphi Picture Perfect Shrinking Enlarging and Rotating Images by Rod Stephens in Delphi Informant Nov 1998 Vol 4 No 11 pp 16 25 Note This article uses the very slow Pixels property See efg s Lab Reports links are below for much quicker Scanline alternatives Simple demonstration program with bitmap scaling rotation Delphi 3 www xs4all nl remcodek zip winrot zip PlgBlt parallelogram block transfer can be used to rotate a bitmap but only in NT 2000 See an example in Delphi Informant Jan 99 pp 68 71 Download code di9901rv zip at www informant com delphi dfiles asp or read the article www delphizine com features 1999 01 di199901rv f di199901rv f asp Freddy Darsonville s E Mail about a code starting point for rotation of a metafile See Jähne pp 283 285 for discussion of 2 and 3 pass rotation algorithm Blend Modes How do Adobe Photoshop Micrografx PicturePublisher and Pegtop XFader blend layers www pegtop net delphi blendmodes Blur Gaussian Blur www gnomehome demon nl uddf pages graphics htm graphics9 www lmc mediaagentur de dpool tips01 0086 htm Jean Yves Quéinec s Estampe Demo program Change Brightness Flip Invert Mirror Gaussian Blur Delphi Magazine Issue 45 Free Disk After unzipping look in the System directory TestBed project Brightness D6 D7 GraphUtil function ColorAdjustLuma clrRGB TColor n Integer fScale BOOL TColor efg s example of how to Change Brightness of pf24bit Bitmap D3 D5 Jean Yves Quéinec s Estampe Demo program Luminosity Luminosità in Regulating Digital Images in Italian Change Brightness Flip Invert Mirror Gaussian Blur Delphi Magazine Issue 45 Free Disk After unzipping look in the System directory TestBed project Comparison Example of comparing two TBitmaps and counting number of pixels that match and differ Example of comparing two TIcons efg s BMPJPG Lab Report compares BMPs from JPEGs of various qualities by computing correlation factor Also see the BitmapCompare command line program included with this Lab Report See Comparing Files on efg s Delphi I O Files page Contrast Enhancement efg s HistoStretchGrays Lab Report Jean Yves Quéinec s Estampe Demo program Michael Christopher s C Builder component for simple image processing with 8 bit images invert and contrast enhancement MichaelChristopher IP Image zip Contrast Contrasto in Regulating Digital Images in Italian Also see Text Contrast Cropping efg s Cropping Example by CopyRect or Scanline Kerstin Thaler s UseNet Post about how to crop a bitmap using mouse events Jacques Oberto s UseNet Post about autocropping Joël Joly s UseNet Post about cropping an image Dithering Floyd Steinberg error diffusion dithering Stucki Error Diffusion dithering Sierra Error Diffusion dithering Jarvis Judice Ninke Error Diffusion dithering Stevenson Arche Error Diffusion dithering Burkes Error Diffusion dithering TGIFImage by Anders Melander www melander dk delphi gifimage release notes whatsnew html Floyd Steinberg dithering Hilbert Peano http www fho emden de hoffmann hilb010101 pdf Dragging Dragging an Image http home t online de home Robert Rossmair dragimg zip Also see scrolling below Drag Drop www ibrtses com delphi ddragdrop html Encryption Decryption efg s ImageCrypt Lab Report See Andreas Filsinger s original summary of this encryption method and an updated version for Delphi 6 01 Filters Note from Lazikas o Pontios about convolution filters TImageProcessor Logical Operations Alpha blending morphological operations filters www fortunecity com skyscraper download 125 imgprs20 zip HarmWave is a graphics application It is mostly designed to create tiles for use as web page backgrounds or windows wallpaper It has many effects and filters but currently only supports BMP and JPG file types Can be used to edit enhance photos It uses Delphi s TBitmap Scanline property extensively www users uswest net sharman1 HWaveSrc zip 3 by 3 Convolution Filters www users uswest net sharman1 convolve zip Filters Median Filter Spyros UseNet Post with Huang s Algorithm Pascal code of computing median Optimal median smoothing Applied Statistics 44 2 258 264 W Haerdle W and M Steiger 1995 ISO Pascal Code ftp amadeus wiwi hu berlin de pub papers sfb373 sfb1994 dpsfb940015 ps Z

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


  • i 0 to Bitmap Width 1 do rowout i rowin Bitmap Width 1 i end bitmap Assign bitmap Freemem rowin end procedure SpiegelnVertikal Bitmap TBitmap var j w INTEGER help TBitmap begin help TBitmap Create help Width Bitmap Width help Height Bitmap Height help PixelFormat Bitmap PixelFormat w Bitmap Width sizeof TRGBTriple for j 0 to Bitmap Height 1 do move Bitmap Scanline j Help Scanline Bitmap Height 1 j w Bitmap Assign help help free end type THelpRGB packed record rgb TRGBTriple dummy byte end procedure Drehen270Grad Bitmap TBitmap var aStream TMemorystream header TBITMAPINFO dc hDC P THelpRGB x y b h Integer RowOut pRGBArray BEGIN aStream TMemoryStream Create aStream SetSize Bitmap Height Bitmap Width 4 with header bmiHeader do begin biSize SizeOf TBITMAPINFOHEADER biWidth Bitmap Width biHeight Bitmap Height biPlanes 1 biBitCount 32 biCompression 0 biSizeimage aStream Size biXPelsPerMeter 1 biYPelsPerMeter 1 biClrUsed 0 biClrImportant 0 end dc GetDC 0 P aStream Memory GetDIBits dc Bitmap Handle 0 Bitmap Height P header dib RGB Colors ReleaseDC 0 dc b bitmap Height rotate h bitmap Width rotate bitmap Width b bitmap height h for y 0 to h 1 do begin rowOut Bitmap ScanLine h 1 y P aStream Memory reset pointer inc p y for x b 1 downto 0 do begin rowout x p rgb inc p h end end aStream Free end procedure Drehen90Grad Bitmap TBitmap var aStream TMemorystream header TBITMAPINFO dc hDC P THelpRGB x y b h Integer RowOut pRGBArray BEGIN aStream TMemoryStream Create aStream SetSize Bitmap Height Bitmap Width 4 with header bmiHeader do begin biSize SizeOf TBITMAPINFOHEADER biWidth Bitmap Width biHeight Bitmap Height biPlanes 1 biBitCount 32 biCompression 0 biSizeimage aStream Size biXPelsPerMeter 1 biYPelsPerMeter 1 biClrUsed 0 biClrImportant 0 end dc GetDC 0 P aStream Memory GetDIBits dc Bitmap Handle 0

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

  • efg's Reference Library: Delphi Graphics File Formats & Conversions
    file viewer Works with most of the HP GL 2 files Understands some HP RTL and PJL http delphi icm edu pl ftp d50free hpgl2 zip ICO Neil Rubenking s PickIconDlg in the AllFuncs pas unit of his ColorClue utility Icon Cursor and Caret Functions Tomes Graphical pp 357 402 Colin Wilson s UseNet Post explaining limitations of TIcon if you want to manipulate icons in Delphi you ve got to code it all yourself The VCL doesn t do what you want Harm s UseNet Post explaining how to create an icon from whatever graphic is in Image1 not just a bitmap and stores it in Image2 Bob Villiers UseNet Post explaining how to store an icon on the clipboard efg s Resource Demo application shows how to use the following file types in resource files BMP ICO JPG GIF requires Anders Melander s TGIFImage EMF TXT AVI WAV and cursors Example of comparing two TIcons Creating a flashing icon FAQ 1103D Creating a Win95 Shell icon application FAQ 2911D Displaying an application associated icon FAQ 1610D Displaying a file s associated icon FAQ 2646D Extracting an icon from a EXE or DLL FAQ 2458D Extracting icons FAQ 1778D How do I create a bitmap from an icon FAQ 2752D How do I create an icon from a bitmap FAQ 2748D Incorrect Application Icon FAQ 4438D Creating a resource only DLL FAQ 1595D Storing icons in your application for use at runtime FAQ 2767D StretchDraw on an icon FAQ 1818D Using an Icon as the Glyph in a TSpeedButton FAQ 2122D efg s example efg s example of converting TIcon to TBitmap as well as extracting the icon s AND bitmap mask and the OR color bitmap Choosing Icons using the PickIconDlg dialog box in From the Shell Part I Dialog Boxes You ve Always Needed Delphi Informant April 1999 Icon Browser View a directory of icons Convert between BMP and ICO formats http www pics software de swico htm The Resource Grabber will scan the directories and drives on your computer and extract all Bitmaps Glyphs button images Icons Cursors JPG JPEG images WAVE and RMI sound files as well as AVI video clips it finds inside the programs and DLL files in any directory of your choice http inner smile com dl res htm An Icon Extractor and Viewer www developers demon co uk iconex html Delphi 3 or 4 Demos Imagview Microangelo 98 Suite of utilities that provides tools for working with the icons cursors and animated cursors www impactsoft com muangelo muangelo html IconJack by Neil Rubenking in PC Magazine ftp ftp zdnet com pcmag 1995 0627 iconjack zip IconEdit32 by Neil Rubenking in PC Magazine www zdnet com pcmag stories solutions 0 8224 2444578 00 html IconEdit by Michael J Mefford in PC Magazine www zdnet com pcmag pctech content 16 12 ut1612 001 html TIconList Unit IcoList PAS in RxLib www rxlib com The Icon Editor and Library Manager for Windows www axialis com axicons index html Icon Archives Glyphs und Icons im Internet http community borland com article 0 1410 25911 00 html Icons from IBM http www 3 ibm com ibm easy eou ext nsf Publish 648 Iconoweb www ozemail com au afactor iconolog html Cool Archive over 4000 icons in 125 categories www coolarchive com icons cfm The Iconolog collection of 22 963 ICOs that use the Windows 16 color palette www ozemail com au afactor iconolog The Icon Book Visual Symbols for Computer Systems and Documentation IPTC Delphi example of extracting IPTC info from a JPEG file that has such information dIPTC can read write and generate IPTC jpeg data dIPTC is part of the dEXIF library and as such is 100 Delphi VCL free and open source The latest version is available from http mcguirez homestead com downloads html Non Delphi Associated Press IPTC header codes http www ap org apserver userguide codes htm IPTC specifications are included with the Adobe Photoshop SDK http partners adobe com asn developer gapsdk PhotoshopSDK html JPEG JPG In Delphi 3 4 5 look for Info Extras JPEG Test and Info Extras JPEG Src on the CD ROM Start with the Readme Txt file in the root directory of the CD ROM Delphi 3 can load JPEGs at runtime through the TImage control Just make sure JPEG is in one of your Uses clauses Delphi 3 can load JPG images at design time if any design time package includes the jpeg unit If you load a jpeg image into a TImage control at design time you have to remember to add the JPEG unit to your project yourself or your app won t be able to load the JPEG from the DFM at runtime Thanks to Danny Thorpe for this clarification When you load a JPEG image into a control at design time it writes it as a JPEG image stream Delphi 4 will automatically add the JPEG unit to your project when you save if any control in the project refers to a TJPEGImage instance Thanks to Danny Thorpe for this clarification The first two bytes of every JPEG file are FFD8 and the last two bytes are FFD9 Bob Villiers UseNet Post about X density Y density and dimensions Example based on UseNet post by Peter Klein showing how to extract DPI directly from JPG file Chris Rorden s Delphi program that demonstrates three simple tasks views a JPEG image reads the red values of a jpeg image and saves the raw data to disk a basic JPEG header reader that will describe the header contents of a JPEG file JPEG Error Messages 0 to 119 efg s JPEGSentinelsAreOK function to find bad JPEGs avoid error 52 JPEG IO pas Replacing Delphi s JPEG Unit You may have encountered problems when trying to write JPEG images between one and two megabytes in size You can avoid these problems by using the Intel JPEG Library and possibly gain a speed advantage as well David Taylor wrote this simple unit as a way of loading BMPs from JPEG files and saving BMPs to JPEG files with the minimum of fuss Following requests I have now updated it to read the half quarter and one eighth size scaling that are easy to do with JPEG images http www david taylor pwp blueyonder co uk software components html JpegIO Requires Intel JPEG Library http developer intel com software products perflib ijl index htm Bob Villiers observed in a UseNet Post that color JPEGs are always 24 bit and 8 bit JPEGs are black white He also showed how to convert a color TBitmap to a jf8bit JPEG efg s Resource Demo application shows how to use the following file types in resource files BMP ICO JPG GIF requires Anders Melander s TGIFImage EMF TXT AVI WAV and cursors How to print a JPEG displayed in a TImage Chris Rorden s version of how to print a JPEG with these improvements 1 checks whether the image is taller or wider and selects landscape or portrait to suit 2 checks the image aspect ratio versus the printer aspect ratio to see whether height or width is the constraint on scaling JPG in Database www elists org pipermail delphi db 2002 June 005872 html M H Avegaart s UseNet Post about how to resize a JPG i e create Small JPG from Big JPG Charles Hacker s UseNet Post with routine to resize JPGs Web Graphic Formats http community borland com article 1 1410 20027 00 html efg s Combine JPGs split and display example Combine files 1 JPG 2 JPG 3 JPG into a single file Read the combined file and display the original JPGs in TImages For a Delphi 2 JPEG Component www hoerstemeier com files jpgimg zip Encryption Decryption efg s ImageCrypt Lab Report JPEG Section Picture This on the Web A CGI Program to Deliver Database Pictures Delphi Informant Feb 1998 Streaming Images from Web Applications Sending a JPEG image from the hard drive http community borland com article 0 1410 20378 00 html efg s UseNet Post to convert TJPEGImage to TBitmap change size of TBitmap and convert back to TJPEGImage Interpreting Cryptic Jpeg Error Number s by Corbin Dunn http community borland com article 0 1410 20433 00 html Corbin s UseNet Post with the same information Kay Schubert s UseNet Post about how to Prevent JPEG Error 41 with code that saves and loads ALL TPicture contained TGraphic descendents into and from a stream without any need to know its actual type According to David J Taylor in a UseNet Posting if you have Delphi 6 JPEG Error 36 should be fixed 13 Aug 2002 How to avoid Random Exceptions being raised when using TJPEGImage or the JPEG unit by Corbin Dunn http community borland com article 0 1410 20073 00 html JPGImg Native VCL JPEG image based on the PasJPG Library Delphi 1 2 Delphi Super Page http delphi icm edu pl ftp d10free jpgimg zip Freeware component allows you to read delete and edit comments inside the JPG files http delphi icm edu pl ftp d20free jpgcom01 zip Displaying a 24 bit True Color bitmap image on a 256 color display FAQ 996D novel use of JPG Peter Below s UseNet Post about no standard clipboard format for JPEGs Extracting a JPEG Resource from an EXE TI 4532D Installing JPEG Components that Ship with Delphi 3 TI4531D Using JPEGs from resource files FAQ 1822D Bob Villiers examples of copying JPEG in BLOB to clipboard and JPEG file on clipboard to BLOB A separate demo shows how to store a user defined image format CF JPEG and a predefined image format DIB simultaneously to the clipboard Bob Villier s related UseNet Post about JPEGs on the clipboard John Herbster s JPEG BLOB example that stores images from JPEG files into Paradox table BLOB field Using JPG s in Paradox Databases www delphi3000 com articles article 1315 asp Monty s UseNet Post about setting DPI in JPEG file Peter Below s UseNet Post about using JPEGs with the Clipboard Kay Schubert s UseNet Post about how to prevent JPEG Error 41 Harm s UseNet Post about using a JPG for Wallpaper Steve Koterski s UseNet Post with TDBImage explanation of loading a JPEG Steve Schafer s Team B UseNet Post about JPEG pixel density Lemke s UseNet Post about how to load TJPEGImage and resave with new image quality Jens Gruschel s UseNet Post about loading a JPEG from a stream Trap exceptions Error 60 and 67 occurs when the JPEG is incomplete Error 52 occurs when the file is not a JPEG for example a GIF is being used as a JEPG Here s how to trap these errors USES JPEG procedure TForm1 Button1Click Sender TObject VAR Picture TPicture begin Use polymorphic Picture since it will load all registered file types Picture TPicture Create TRY TRY Picture LoadFromFile VeryBad JPG EXCEPT ON E Exception DO ShowMessage Very Bad JPEG E Message END Image1 Picture Picture FINALLY Picture Free END end Maintaining Aspect Ratio Displaying a TJPEGImage in a TImage with Stretch enabled can distort the image display Either set Stretch to FALSE or adjust one of the dimensions of the TImage to display the image with the correct aspect ratio Assume Strech is enabled in TImage USES JPEG procedure TForm1 Button1Click Sender TObject VAR JPEGImage TJPEGImage begin JPEGImage TJPEGImage Create TRY JPEGImage LoadFromFile Fireworks jpg FIX ASPECT RATIO HERE Image1 Picture Graphic JPEGImage FINALLY JPEGImage Free END end Replace FIX ASPECT RATIO HERE with one of these two statements For given TImage Height compute TImage Width to maintain aspect ratio of original JPEG image Image1 Width MulDiv Image1 Height JPEGImage Width JPEGImage Height or For given TImage Width compute TImage Height to maintain aspect ratio of original JPEG image Image1 Height MulDiv Image1 Width JPEGImage Height JPEGImage Width Example of how to use JPGs in a database with D4 www stg com br soft dbjpg zip GIF and JPEG Components for Delphi www undu com Articles 990114a html efg s BMPJPG Lab Report including graph of File Size vs JPEG Quality Non Delphi JPEG Links CRYX s note about the JPEG decoding algorithm www opennet ru docs formats jpeg txt Image Compression JPEG http pascalzone amirmelamed co il Graphics JPEG JPEG htm PDF describing the JPEG format www w3 org Graphics JPEG itu t81 pdf JPEG fundamentals http murray newcastle edu au users students 2000 c9425349 section3 htm JPEG 2000 Non Delphi Jasper Project The objective of this project is to develop a software based reference implementation of the codec specified in the JPEG 2000 Part 1 standard i e ISO IEC 15444 1 www ece ubc ca mdadams jasper MPEG Playing MPEG files in Delphi apps FAQ 1890D MPEG Audio Tools Delphi Unit www dv co yu mpgscript mpgtools htm Also see MP3 on the Multimedia page PCX PC Paintbrush by Z soft TifIMG 16 32 Delphi components provide for reading of numerous image formats such as TIFF BMP PCX DCX JPEG TGA WMF WPG and the new PNG graphics format www witsends com developer products tiffimg htm Read PCX into TBitmap or write PCX from TBitmap using Davie Reed s PCX unit Download PCX ZIP 282 KB which also includes Delphi 3 demo program and sample PCX images 1 2 8 and 24 bit pixels Complete source code including assembly routines WritePCXLine and PixelConvertRGBLine TUniDIB Class for working with Device Independent Bitmaps It can handle any allowed color depth Now it has ability to load BMP and PCX files www geocities com SiliconValley Hills 1335 zip unidib zip Supported by ImageLib www imagelib com Michel Brazeau s UseNet Post about how to change DPI fields in PCX header PDF When you have an Acrobat Reader installed there is an OCX file in your Windows System directory Import this file into Delphi and select the Acrobat Reader icon and drop an reader on the form Steven Van Hulle s UseNet post 5 Dec 99 Adobe supplies an ActiveX component with Acrobat Reader which makes this very easy Import ActiveX Component menu in D4 file to import is PDF OCX Will be added to ActiveX palette Drop one on a form Typical code to load file if OpenDialog1 Execute then Pdf1 LoadFile OpenDialog1 FileName Peter Below s Team B UseNet Post about printing PDF files PDFlib allows you to implement PDF output in your own products www pdflib com PGM Non Delphi Portable Greymap format wotsit org Used with the AT T Cambridge Laboratory s Database of Faces 400 images at www uk research att com facedatabase html see conversion section below for Delphi viewer PICT Primary format for Apple Macintosh graphics PNG Portable Network Graphics Delphi by Gustavo Daud http pngdelphi sourceforge net Peter Haas overview for freeware png libraries with source http delphi pjh2 de articles graphic png php PNG Graphics with Delphi and Kylix http www psychology nottingham ac uk staff cr1 png html TPNGImage http pngdelphi sourceforge net How to rebuild the LNPG library from public source code using Borland s free C compiler and provided Delphi interface units www david taylor pwp blueyonder co uk software components html PNGLibrary PngUnit PNG for Delphi Read view and save PNG convert BMP to PNG PNG Portable Network Graphics Nothing to install Compile and run the program Source code included http sharepower virtualave net png html GRIP Geographic Raster Image Processor processes PNG format images Import Landsat Slar SAR and AVHRR imagery into the PNG format www winsite com info des package 1500000034993 html Read view and save PNG convert BMP to PNG and PNG to BMP http delphi icm edu pl ftp d10free pngunit zip Envision Image Library The evaluation version of the Envision Image Library includes the compiled units DCU s and object files OBJ s Its supports Dephi 3 4 5 and C Builder 4 The download also includes complete source code for registered users www intervalsoftware com download html Web Graphic Formats http community borland com article 1 1410 20027 00 html TifIMG 16 32 Delphi components provide for reading of numerous image formats such as TIFF BMP PCX DCX JPEG TGA WMF WPG and the new PNG graphics format www witsends com developer products tiffimg htm Non Delphi Portable Network Graphics ping files An alternative to GIF files Technical information www libpng org pub png PNG Specification www libpng org pub png spec PS Postscript Non Delphi www gnu org software ghostscript ghostscript html RichEdit to Canvas or TBitmap MBo s UseNet Posting with sample code QuickTime Files Dominique Louis UseNet Post with alternatives SFF Structured Fax File Delphi unit http delphi pjh2 de units sff php Format description http delphi pjh2 de articles graphic sff format php SLD TSlide class is a TImage extension to support AutoCAD slide files SLD This allows slides to be loaded into the TPicture of a TImage The RegisterFileFormat method of TPicture enables preview of slides in the TOpenPictureDialog By Stephan Haugh from England TSlide ZIP D3 D4 D5 Sun Raster Files Example of reading three Sun Raster images into pf24bit TBitmap efg s Create Mandrill BMP Lab Report TGA Targa Viewer Simple image viewer with high quality display of images even on 256 32K and 64K colour adapters Displays TGA JPEG GIF WMF and BMP files www davidtaylor freeserve co uk software imaging html A unit to work with graphics Many effects like motion blur alpha blending antialiasing text texture mapping save load from BMP TGA http delphi icm edu pl ftp d30free graph64 zip TifIMG 16 32 Delphi components provide for reading of numerous image formats such as TIFF BMP PCX DCX JPEG TGA WMF WPG and the new PNG graphics format www witsends com developer products tiffimg htm Read TGA into TBitmap or write TGA from TBitmap using Davie Reed s Targa unit Download Targa ZIP 8 KB which also includes Delphi 3

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


  • 342 3 90 42 25 52 15 184 90 42 294 3 343 0 114 67 57 79 10 127 114 43 294 9 343 8 114 67 57 79 10 127 114 44 295 6 344 5 125 81 70 92 12 112 125 45 296 3 345 3 101 61 48 70 14 133 101 46 296 9 346 0 78 38 25 47 14 173 78 47 297 6 346 8 69 30 17 38 15 192 69 48 298 2 347 5 78 36 24 46 13 176 78 49 298 9 348 3 92 48 37 59 12 152 92 50 299 6 349 0 109 69 60 79 11 114 109 51 300 2 349 8 115 77 67 86 12 106 115 52 300 9 350 5 96 59 45 66 16 135 96 53 301 5 351 3 82 44 34 53 12 149 82 54 302 2 352 0 89 49 40 59 11 140 89 55 302 9 352 8 89 49 40 59 11 140 89 56 303 5 353 5 119 77 68 88 10 109 119 57 304 2 354 3 142 98 87 109 12 98 142 58 304 9 355 0 138 91 81 103 10 105 138 59 305 5 355 8 130 83 72 95 11 113 130 60 306 2 356 5 93 44 31 56 12 170 93 61 306 8 357 3 86 34 25 48 8 180 86 62 307 5 358 0 93 41 35 56 6 159 93 63 308 2 358 8 103 51 45 66 6 143 103 64 308 8 359 5 120 68 63 83 5 121 120 65 309 5 360 3 144 90 82 105 7 109 144 66 310 1 361 0 126 74 65 88 8 123 126 67 310 8 361 8 126 74 65 88 8 123 126 68 311 5 362 5 87 35 30 50 5 167 87 69 312 1 363 3 61 14 7 27 7 225 61 70 312 8 364 0 57 12 2 23 10 246 57 71 313 5 364 8 74 30 15 39 15 203 74 72 314 1 365 5 109 67 45 73 20 149 109 73 314 8 366 3 125 82 61 89 19 130 125 74 315 4 367 0 128 85 67 93 17 121 128 75 316 1 367 8 127 80 67 91 13 120 127 76 316 8 368 5 107 60 50 72 10 135 107 77 317 4 369 3 91 46 38 58 9 148 91 78 318 1 370 0 102 59 54 71 6 120 102 79 318 7 370 8 102 59 54 71 6 120 102 80 319 4 371 5 128 82 78 96 4 99 128 81 320 1 372 3 131 81 78 96 3 103 131 82 320 7 373 0 118 68 65 83 3 114

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

  • efg's Image Processing -- Fade Lab Report
    of fade will depend on processing speed of your machine If desired press the Redisplay button to see the original image After a FadeOut select the Fade In button to fade the image from black back to the original image Discussion The FormCreate routine creates a BitmapBase that is used until the program is terminated The ButtonDrawClick displays the Daisy image on the BitmapBase 32 steps are used to fade an image in or out For each of these 32 steps each pixel FOR each j ScanLine row FOR each i pixel is manipulated Each R G B pixel value is multiplied by step and divided by 32 For fading an image out the step ranged from 32 to 0 this was equivalent to multiplying by a linear factor from 1 0 to 0 0 The opposite was true for fading in an image Step ranged from 0 to 32 The multiplier was effectively 0 0 to 1 0 The routine MulDiv from the Windows unit might be effective here but was not used There is little or no flicker when fading a small image However there is a slight flicker when fading a nearly full screen image How to eliminate this flicker is still an open question API calls InvalidateRect and RedrawWindow were used in the ButtonFadeOutClick method while the VCL method Repaint was used in the ButtonFadeInClick method Palette animation is not possible with 24 bit bitmaps in high color or true color modes That is palette animate tricks only work with a palette device in 256 color mode See also the Tween Lab Report Conclusions Images can be faded in or out relatively well using the Delphi ScanLine property which was new in Delphi 3 However a slight flicker is present when fading very large images Also

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

  • efg's Image Processing -- Image Enhancement and Thresholding Using Palettes
    with f x Cos Pi x c s c s 2 x c s 2 otherwise f x 0 0 c 255 0 s 2 255 Again c is the center of the symmetric positive half of a cosine curve and s is a measure of the width of the curve C 255 B 0 The Triangle map is a piecewise linear mapping function defined over two ranges of x as f x 2 x c s 2 s c s 2 x c f x 2 c s 2 x s c x c s 2 otherwise f x 0 0 c 255 0 s 2 255 with analogous definitions for c and s C 255 B 0 The preceding definitions are provided as a demonstration of mapping in general and do not necessarily produce useful or practical results for a particular image However they can provide aesthetically interesting effects Try toggling back and forth between the standard brightness contrast transformation and the other functions set at their initial default positions In particular observe the image appearance and note that the Triangle map gives the same results as the brightness contrast operation Change the location of the center slider to position 0 This produces an inverted or negative image In any event every time we change C or B for a given f x the process involves a two step procedure of calculating a lookup table and then mapping the image values to a bitmap This is time consuming since we must loop through Max Min W H addresses Thus for large broad spectrum images it can become difficult to achieve image modifications in apparent real time Materials and Equipment Software Requirements Windows 95 98 2000 NT Borland C Builder 4 to recompile PalettePrj EXE Hardware Requirements 800 by 600 display in 256 colors 16 24 or 32 bit color mode Procedure Double click on the PalettePrj exe file from the zipped Builder project Click the Open button to load in a bitmap of your choice The program will convert color bitmaps to pf8bit format by averaging the R G B color planes to a gray value Move the left B rightness slider or the right C ontrast slider on the panel at the left of the form and observe the changes in both the image and the gray scale bar to the right of the sliders Labels at the bottom of the sliders are updated with the current values of B and C Toggle between the radio group items to observe various thresholding and transformation effects The sliders now work as upper and lower range selectors thresholding or as centering and scaling selectors Discussion A solution to image modifications in apparent real time is to use a pf8bit bitmap for display purposes and a logical color palette LOGPALETTE structure solution from Patrick M Martin posted 7 17 00 on borland public cppbuilder graphics This structure contains the number and an array of PALETTEENTRY structures which define the color

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



  •