X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Flib%2Fvampimg%2FImagingPcx.pas;h=d278542ed188bf86b33f225f9d0595cd67d316fd;hp=257ad76837440f15b948ea27f82e5fe686e83a12;hb=48fffe15692e9dcd2bdc2ed64f6e998af13211cf;hpb=ecfa6c6b626717711a8ae93cc455f69f0048498a diff --git a/src/lib/vampimg/ImagingPcx.pas b/src/lib/vampimg/ImagingPcx.pas index 257ad76..d278542 100644 --- a/src/lib/vampimg/ImagingPcx.pas +++ b/src/lib/vampimg/ImagingPcx.pas @@ -1,5 +1,4 @@ { - $Id: ImagingPcx.pas 100 2007-06-28 21:09:52Z galfar $ Vampyre Imaging Library by Marek Mauder http://imaginglib.sourceforge.net @@ -44,10 +43,10 @@ type to spread).} TPCXFileFormat = class(TImageFileFormat) protected + procedure Define; override; function LoadData(Handle: TImagingHandle; var Images: TDynImageDataArray; OnlyFirstLevel: Boolean): Boolean; override; public - constructor Create; override; function TestFormat(Handle: TImagingHandle): Boolean; override; end; @@ -77,13 +76,11 @@ type { TPCXFileFormat } -constructor TPCXFileFormat.Create; +procedure TPCXFileFormat.Define; begin - inherited Create; + inherited; FName := SPCXFormatName; - FCanLoad := True; - FCanSave := False; - FIsMultiImageFormat := False; + FFeatures := [ffLoad]; AddMasks(SPCXMasks); end; @@ -263,7 +260,7 @@ begin else if FileDataFormat = ifMono then begin // Convert 1bit images to ifIndex8 - Convert1To8(UncompData, Bits, Width, Height, Hdr.BytesPerLine); + Convert1To8(UncompData, Bits, Width, Height, Hdr.BytesPerLine, False); end else if FileDataFormat = ifIndex2 then begin @@ -271,7 +268,7 @@ begin // usually use (from specs, I've never seen one myself) CGA palette // which is not array of RGB tripplets. So 2bit PCXs are loaded but // their colors would be wrong - Convert2To8(UncompData, Bits, Width, Height, Hdr.BytesPerLine); + Convert2To8(UncompData, Bits, Width, Height, Hdr.BytesPerLine, False); end else if FileDataFormat = ifIndex4 then begin @@ -306,7 +303,7 @@ begin else if (Hdr.BitsPerPixel = 4) and (Hdr.Planes = 1) then begin // Convert 4bit images to ifIndex8 - Convert4To8(UncompData, Bits, Width, Height, Hdr.BytesPerLine); + Convert4To8(UncompData, Bits, Width, Height, Hdr.BytesPerLine, False); end end;