View Issue Details

IDProjectCategoryView StatusLast Update
0014638LazarusLCLpublic2009-09-21 11:47
ReporterDmitry Boyarintsev Assigned ToPaul Ishenin  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0014638: .icns file writer (icons <= 128x128)
Description.icns file writer for icons <= 128x128.
for 256 and higher jpeg2000 is required.

The patch needs to be tested on big-endian machines.
Additional Informationprogram project1;

{$mode objfpc}{$H+}

uses
  FileUtil, Interfaces, Graphics;

var
  myicon : TIcnsIcon;

procedure AddLayer(size: Integer; color: TColor);
var
  ofs, efs : Integer;
begin
  myicon.Add(pf32bit, size, size);
  myicon.Current:=myicon.Count-1;
  myicon.Canvas.Brush.Color:=color;
  myicon.Canvas.FillRect(0,0,size,size);
  myicon.Canvas.Brush.Color:=clWhite;
  ofs := size div 4;
  efs := size - ofs;
  myicon.Canvas.FillRect(ofs, ofs, efs, efs);
end;

begin
  myicon := TIcnsIcon.Create;
  AddLayer(16, clRed);
  AddLayer(32, clYellow);
  AddLayer(48, clBlack);
  AddLayer(128, clBlue);

  DeleteFileUTF8('test.icns');
  myicon.SaveToFile('test.icns');
  myicon.Free;
end.
TagsNo tags attached.
Fixed in Revision21795
LazTarget0.9.30
Widgetset
Attached Files

Activities

2009-09-21 08:43

 

icnswriter.patch.zip (2,646 bytes)

Dmitry Boyarintsev

2009-09-21 08:44

developer   ~0030868

fixed a bug with bad 128x128 written icons

Paul Ishenin

2009-09-21 10:48

manager   ~0030871

Thanks, applied. But you can apply yourself as I know. Anyway, please close.

Dmitry Boyarintsev

2009-09-21 11:47

developer   ~0030873

I can apply, but since you're author of IcnsIcon, you're to review it first :)

thanks.

Issue History

Date Modified Username Field Change
2009-09-20 10:18 Dmitry Boyarintsev New Issue
2009-09-20 10:18 Dmitry Boyarintsev File Added: icnswriter.patch.zip
2009-09-20 10:18 Dmitry Boyarintsev LazTarget => -
2009-09-20 10:19 Dmitry Boyarintsev Status new => assigned
2009-09-20 10:19 Dmitry Boyarintsev Assigned To => Paul Ishenin
2009-09-20 10:20 Dmitry Boyarintsev LazTarget - => 0.9.30
2009-09-20 10:20 Dmitry Boyarintsev Additional Information Updated
2009-09-20 10:21 Dmitry Boyarintsev Additional Information Updated
2009-09-21 08:43 Dmitry Boyarintsev Description Updated
2009-09-21 08:43 Dmitry Boyarintsev Additional Information Updated
2009-09-21 08:43 Dmitry Boyarintsev File Deleted: icnswriter.patch.zip
2009-09-21 08:43 Dmitry Boyarintsev File Added: icnswriter.patch.zip
2009-09-21 08:44 Dmitry Boyarintsev Summary .icns file writer (icons <= 48x48) => .icns file writer (icons <= 128x128)
2009-09-21 08:44 Dmitry Boyarintsev Note Added: 0030868
2009-09-21 10:48 Paul Ishenin Fixed in Revision => 21795
2009-09-21 10:48 Paul Ishenin Status assigned => resolved
2009-09-21 10:48 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2009-09-21 10:48 Paul Ishenin Resolution open => fixed
2009-09-21 10:48 Paul Ishenin Note Added: 0030871
2009-09-21 10:49 Paul Ishenin Target Version => 0.9.30
2009-09-21 11:47 Dmitry Boyarintsev Status resolved => closed
2009-09-21 11:47 Dmitry Boyarintsev Note Added: 0030873