- fixed after Lazarus bitmap rewrite
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@486 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
e87ec306f4
commit
4ef7cfd8d1
@ -33,14 +33,16 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="40">
|
||||
<Units Count="49">
|
||||
<Unit0>
|
||||
<Filename Value="rgbexample.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="RGBExample"/>
|
||||
<CursorPos X="1" Y="17"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="33"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="34"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rgbunit.pas"/>
|
||||
@ -48,18 +50,20 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="rgbunit.lrs"/>
|
||||
<UnitName Value="RGBUnit"/>
|
||||
<CursorPos X="34" Y="29"/>
|
||||
<TopLine Value="65"/>
|
||||
<CursorPos X="23" Y="33"/>
|
||||
<TopLine Value="22"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="33"/>
|
||||
<UsageCount Value="34"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<UnitName Value="RGBGraphics"/>
|
||||
<CursorPos X="58" Y="872"/>
|
||||
<TopLine Value="19"/>
|
||||
<CursorPos X="42" Y="35"/>
|
||||
<TopLine Value="22"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="unit1.lrs"/>
|
||||
@ -142,8 +146,8 @@
|
||||
<Unit15>
|
||||
<Filename Value="..\..\lazarus\lcl\interfaces\win32\interfaces.pp"/>
|
||||
<UnitName Value="Interfaces"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="17"/>
|
||||
<CursorPos X="51" Y="11"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
@ -310,18 +314,202 @@
|
||||
<TopLine Value="142"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit39>
|
||||
<Unit40>
|
||||
<Filename Value="..\..\lazarus\fpc\2.2.1\source\packages\fcl-image\src\fpimage.pp"/>
|
||||
<UnitName Value="FPimage"/>
|
||||
<CursorPos X="17" Y="130"/>
|
||||
<TopLine Value="120"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit40>
|
||||
<Unit41>
|
||||
<Filename Value="..\..\lazarus\lcl\extctrls.pp"/>
|
||||
<UnitName Value="ExtCtrls"/>
|
||||
<CursorPos X="30" Y="584"/>
|
||||
<TopLine Value="572"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit41>
|
||||
<Unit42>
|
||||
<Filename Value="..\..\lazarus\lcl\graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="34" Y="1319"/>
|
||||
<TopLine Value="1308"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit42>
|
||||
<Unit43>
|
||||
<Filename Value="..\..\lazarus\lcl\include\picture.inc"/>
|
||||
<CursorPos X="14" Y="37"/>
|
||||
<TopLine Value="33"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit43>
|
||||
<Unit44>
|
||||
<Filename Value="..\..\lazarus\fpc\2.2.1\source\packages\fcl-image\src\fpimage.inc"/>
|
||||
<CursorPos X="3" Y="177"/>
|
||||
<TopLine Value="207"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit44>
|
||||
<Unit45>
|
||||
<Filename Value="..\..\lazarus\lcl\include\pixmap.inc"/>
|
||||
<CursorPos X="21" Y="297"/>
|
||||
<TopLine Value="279"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit45>
|
||||
<Unit46>
|
||||
<Filename Value="..\..\lazarus\lcl\intfgraphics.pas"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<CursorPos X="3" Y="409"/>
|
||||
<TopLine Value="576"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit46>
|
||||
<Unit47>
|
||||
<Filename Value="..\..\lazarus\lcl\include\bitmap.inc"/>
|
||||
<CursorPos X="25" Y="62"/>
|
||||
<TopLine Value="60"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit47>
|
||||
<Unit48>
|
||||
<Filename Value="..\..\lazarus\fpc\2.2.1\source\packages\fcl-image\src\fpwritebmp.pp"/>
|
||||
<UnitName Value="FPWriteBMP"/>
|
||||
<CursorPos X="3" Y="31"/>
|
||||
<TopLine Value="18"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit48>
|
||||
</Units>
|
||||
<JumpHistory Count="1" HistoryIndex="0">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="rgbunit.pas"/>
|
||||
<Caret Line="75" Column="54" TopLine="77"/>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="291" Column="16" TopLine="276"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="290" Column="15" TopLine="276"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="347" Column="49" TopLine="330"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="343" Column="59" TopLine="335"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="342" Column="55" TopLine="329"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="340" Column="36" TopLine="329"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="197" Column="27" TopLine="184"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="198" Column="27" TopLine="185"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="199" Column="27" TopLine="186"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="340" Column="36" TopLine="327"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="342" Column="15" TopLine="329"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="345" Column="36" TopLine="332"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="348" Column="15" TopLine="335"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="371" Column="36" TopLine="347"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="390" Column="14" TopLine="374"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="342" Column="61" TopLine="331"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="342" Column="59" TopLine="331"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="291" Column="10" TopLine="279"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="375" Column="10" TopLine="363"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="471" Column="37" TopLine="456"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="457" Column="28" TopLine="444"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="458" Column="28" TopLine="445"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="457" Column="28" TopLine="445"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="453" Column="30" TopLine="445"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\..\lazarus\lcl\include\bitmap.inc"/>
|
||||
<Caret Line="62" Column="21" TopLine="60"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\rgbgraphics.pas"/>
|
||||
<Caret Line="458" Column="31" TopLine="445"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="rgbexample.lpr"/>
|
||||
<Caret Line="17" Column="1" TopLine="1"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="rgbunit.pas"/>
|
||||
<Caret Line="44" Column="16" TopLine="43"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<LCLWidgetType Value="qt"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
|
@ -30,7 +30,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
||||
RGBGraphics, ExtDlgs, ExtCtrls;
|
||||
RGBGraphics, ExtDlgs;
|
||||
|
||||
type
|
||||
|
||||
|
@ -32,7 +32,7 @@ unit RGBGraphics;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLIntf,
|
||||
Classes, SysUtils, LCLIntf, FPWriteBMP,
|
||||
LCLType, LCLProc, FPImage, LResources, IntfGraphics,
|
||||
GraphType, Graphics, Forms, Math, Clipbrd,
|
||||
RGBTypes, RGBRoutines, RGBUtils;
|
||||
@ -283,15 +283,12 @@ end;
|
||||
constructor TRGB32Bitmap.CreateFromFile(const FileName: String);
|
||||
var
|
||||
Image: TLazIntfImage;
|
||||
Reader: TFPCustomImageReader;
|
||||
begin
|
||||
Image := CreateDefaultLazIntfImage;
|
||||
Reader := GetFPImageReaderForFileExtension(ExtractFileExt(FileName)).Create;
|
||||
try
|
||||
Image.LoadFromFile(FileName, Reader);
|
||||
Image.LoadFromFile(FileName);
|
||||
CreateFromLazIntfImage(Image);
|
||||
finally
|
||||
Reader.Free;
|
||||
Image.Free;
|
||||
end;
|
||||
end;
|
||||
@ -341,7 +338,7 @@ end;
|
||||
|
||||
procedure TRGB32Bitmap.SaveToStream(Stream: TStream);
|
||||
begin
|
||||
SaveToStream(Stream, Bounds(0, 0, Width, Height), TPixmap.GetDefaultFPWriter);
|
||||
SaveToStream(Stream, Bounds(0, 0, Width, Height), TLazWriterXPM);
|
||||
end;
|
||||
|
||||
procedure TRGB32Bitmap.SaveToStream(Stream: TStream;
|
||||
@ -370,15 +367,12 @@ end;
|
||||
procedure TRGB32Bitmap.SaveToFile(const FileName: String);
|
||||
var
|
||||
Image: TLazIntfImage;
|
||||
Writer: TFPCustomImageWriter;
|
||||
begin
|
||||
Image := CreateDefaultLazIntfImage;
|
||||
Writer := GetFPImageWriterForFileExtension(ExtractFileExt(FileName)).Create;
|
||||
try
|
||||
inherited SaveToLazIntfImage(Image);
|
||||
Image.SaveToFile(FileName, Writer);
|
||||
Image.SaveToFile(FileName);
|
||||
finally
|
||||
Writer.Free;
|
||||
Image.Free;
|
||||
end;
|
||||
end;
|
||||
@ -460,8 +454,8 @@ begin
|
||||
PixmapStream := TMemoryStream.Create;
|
||||
BitmapStream := TMemoryStream.Create;
|
||||
Image := CreateDefaultLazIntfImage;
|
||||
PixmapWriter := TPixmap.GetDefaultFPWriter.Create;
|
||||
BitmapWriter := TBitmap.GetDefaultFPWriter.Create;
|
||||
PixmapWriter := TLazWriterXPM.Create;
|
||||
BitmapWriter := TFPWriterBMP.Create;
|
||||
try
|
||||
R := Mask.GetMaskedRect;
|
||||
SaveToLazIntfImage(Image, R);
|
||||
|
Loading…
Reference in New Issue
Block a user