You've already forked lazarus-ccr
- 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:
@ -33,14 +33,16 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="40">
|
<Units Count="49">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="rgbexample.lpr"/>
|
<Filename Value="rgbexample.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="RGBExample"/>
|
<UnitName Value="RGBExample"/>
|
||||||
<CursorPos X="1" Y="17"/>
|
<CursorPos X="1" Y="17"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="33"/>
|
<EditorIndex Value="1"/>
|
||||||
|
<UsageCount Value="34"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="rgbunit.pas"/>
|
<Filename Value="rgbunit.pas"/>
|
||||||
@ -48,18 +50,20 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ResourceFilename Value="rgbunit.lrs"/>
|
<ResourceFilename Value="rgbunit.lrs"/>
|
||||||
<UnitName Value="RGBUnit"/>
|
<UnitName Value="RGBUnit"/>
|
||||||
<CursorPos X="34" Y="29"/>
|
<CursorPos X="23" Y="33"/>
|
||||||
<TopLine Value="65"/>
|
<TopLine Value="22"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="33"/>
|
<UsageCount Value="34"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\rgbgraphics.pas"/>
|
<Filename Value="..\rgbgraphics.pas"/>
|
||||||
<UnitName Value="RGBGraphics"/>
|
<UnitName Value="RGBGraphics"/>
|
||||||
<CursorPos X="58" Y="872"/>
|
<CursorPos X="42" Y="35"/>
|
||||||
<TopLine Value="19"/>
|
<TopLine Value="22"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="unit1.lrs"/>
|
<Filename Value="unit1.lrs"/>
|
||||||
@ -142,8 +146,8 @@
|
|||||||
<Unit15>
|
<Unit15>
|
||||||
<Filename Value="..\..\lazarus\lcl\interfaces\win32\interfaces.pp"/>
|
<Filename Value="..\..\lazarus\lcl\interfaces\win32\interfaces.pp"/>
|
||||||
<UnitName Value="Interfaces"/>
|
<UnitName Value="Interfaces"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="51" Y="11"/>
|
||||||
<TopLine Value="17"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit15>
|
</Unit15>
|
||||||
<Unit16>
|
<Unit16>
|
||||||
@ -310,18 +314,202 @@
|
|||||||
<TopLine Value="142"/>
|
<TopLine Value="142"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit39>
|
</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>
|
</Units>
|
||||||
<JumpHistory Count="1" HistoryIndex="0">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="rgbunit.pas"/>
|
<Filename Value="..\rgbgraphics.pas"/>
|
||||||
<Caret Line="75" Column="54" TopLine="77"/>
|
<Caret Line="291" Column="16" TopLine="276"/>
|
||||||
</Position1>
|
</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>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
|
<LCLWidgetType Value="qt"/>
|
||||||
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
|
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
|
@ -30,7 +30,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
||||||
RGBGraphics, ExtDlgs, ExtCtrls;
|
RGBGraphics, ExtDlgs;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ unit RGBGraphics;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLIntf,
|
Classes, SysUtils, LCLIntf, FPWriteBMP,
|
||||||
LCLType, LCLProc, FPImage, LResources, IntfGraphics,
|
LCLType, LCLProc, FPImage, LResources, IntfGraphics,
|
||||||
GraphType, Graphics, Forms, Math, Clipbrd,
|
GraphType, Graphics, Forms, Math, Clipbrd,
|
||||||
RGBTypes, RGBRoutines, RGBUtils;
|
RGBTypes, RGBRoutines, RGBUtils;
|
||||||
@ -283,15 +283,12 @@ end;
|
|||||||
constructor TRGB32Bitmap.CreateFromFile(const FileName: String);
|
constructor TRGB32Bitmap.CreateFromFile(const FileName: String);
|
||||||
var
|
var
|
||||||
Image: TLazIntfImage;
|
Image: TLazIntfImage;
|
||||||
Reader: TFPCustomImageReader;
|
|
||||||
begin
|
begin
|
||||||
Image := CreateDefaultLazIntfImage;
|
Image := CreateDefaultLazIntfImage;
|
||||||
Reader := GetFPImageReaderForFileExtension(ExtractFileExt(FileName)).Create;
|
|
||||||
try
|
try
|
||||||
Image.LoadFromFile(FileName, Reader);
|
Image.LoadFromFile(FileName);
|
||||||
CreateFromLazIntfImage(Image);
|
CreateFromLazIntfImage(Image);
|
||||||
finally
|
finally
|
||||||
Reader.Free;
|
|
||||||
Image.Free;
|
Image.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -341,7 +338,7 @@ end;
|
|||||||
|
|
||||||
procedure TRGB32Bitmap.SaveToStream(Stream: TStream);
|
procedure TRGB32Bitmap.SaveToStream(Stream: TStream);
|
||||||
begin
|
begin
|
||||||
SaveToStream(Stream, Bounds(0, 0, Width, Height), TPixmap.GetDefaultFPWriter);
|
SaveToStream(Stream, Bounds(0, 0, Width, Height), TLazWriterXPM);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRGB32Bitmap.SaveToStream(Stream: TStream;
|
procedure TRGB32Bitmap.SaveToStream(Stream: TStream;
|
||||||
@ -370,15 +367,12 @@ end;
|
|||||||
procedure TRGB32Bitmap.SaveToFile(const FileName: String);
|
procedure TRGB32Bitmap.SaveToFile(const FileName: String);
|
||||||
var
|
var
|
||||||
Image: TLazIntfImage;
|
Image: TLazIntfImage;
|
||||||
Writer: TFPCustomImageWriter;
|
|
||||||
begin
|
begin
|
||||||
Image := CreateDefaultLazIntfImage;
|
Image := CreateDefaultLazIntfImage;
|
||||||
Writer := GetFPImageWriterForFileExtension(ExtractFileExt(FileName)).Create;
|
|
||||||
try
|
try
|
||||||
inherited SaveToLazIntfImage(Image);
|
inherited SaveToLazIntfImage(Image);
|
||||||
Image.SaveToFile(FileName, Writer);
|
Image.SaveToFile(FileName);
|
||||||
finally
|
finally
|
||||||
Writer.Free;
|
|
||||||
Image.Free;
|
Image.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -460,8 +454,8 @@ begin
|
|||||||
PixmapStream := TMemoryStream.Create;
|
PixmapStream := TMemoryStream.Create;
|
||||||
BitmapStream := TMemoryStream.Create;
|
BitmapStream := TMemoryStream.Create;
|
||||||
Image := CreateDefaultLazIntfImage;
|
Image := CreateDefaultLazIntfImage;
|
||||||
PixmapWriter := TPixmap.GetDefaultFPWriter.Create;
|
PixmapWriter := TLazWriterXPM.Create;
|
||||||
BitmapWriter := TBitmap.GetDefaultFPWriter.Create;
|
BitmapWriter := TFPWriterBMP.Create;
|
||||||
try
|
try
|
||||||
R := Mask.GetMaskedRect;
|
R := Mask.GetMaskedRect;
|
||||||
SaveToLazIntfImage(Image, R);
|
SaveToLazIntfImage(Image, R);
|
||||||
|
Reference in New Issue
Block a user