summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2010-08-10 14:09:57 +0200
committerMarti Maria <info@littlecms.com>2010-08-10 14:09:57 +0200
commite53c88b8f0fda2e11be191bf9a207b2ed141df30 (patch)
treedf6b687e2fe5e7c0d27921d45a9c9ec632d1c418 /utils
parenta80a1ec9dc9e84135ad60ed0b18799eccc74b936 (diff)
downloadlcms2-e53c88b8f0fda2e11be191bf9a207b2ed141df30.tar.gz
Fixed a bug in the generation of complex V4 devicelinks
Diffstat (limited to 'utils')
-rwxr-xr-xutils/delphi/demo1.dfmbin4451 -> 1969 bytes
-rwxr-xr-xutils/delphi/demo1.pas25
-rw-r--r--utils/tificc/tificc.c2
3 files changed, 22 insertions, 5 deletions
diff --git a/utils/delphi/demo1.dfm b/utils/delphi/demo1.dfm
index 8a00ea7..3faea0e 100755
--- a/utils/delphi/demo1.dfm
+++ b/utils/delphi/demo1.dfm
Binary files differ
diff --git a/utils/delphi/demo1.pas b/utils/delphi/demo1.pas
index f8d1528..750f29b 100755
--- a/utils/delphi/demo1.pas
+++ b/utils/delphi/demo1.pas
@@ -36,6 +36,8 @@ type
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
+ procedure ComboBoxIntentChange(Sender: TObject);
+ procedure ScrollBar1Change(Sender: TObject);
private
{ Private declarations }
function ComputeFlags: DWORD;
@@ -124,7 +126,7 @@ begin
Combo.Tag := Integer(Files);
end;
-// A rather simple Logger... note the CDECL convention
+// A rather simple Logger... note the "cdecl" convention
PROCEDURE ErrorLogger(ContextID: cmsContext; ErrorCode: cmsUInt32Number;
Text: PAnsiChar); Cdecl;
begin
@@ -134,7 +136,6 @@ end;
constructor TForm1.Create(Owner: TComponent);
var
-
IntentNames: array [0 .. 20] of PAnsiChar;
i, n: Integer;
begin
@@ -147,7 +148,7 @@ begin
ScrollBar1.Max := 100;
FillCombo(ComboBoxInput, IS_INPUT OR IS_COLORSPACE OR IS_DISPLAY);
- FillCombo(ComboBoxOutput, $FFFF { IS_DISPLAY } );
+ FillCombo(ComboBoxOutput, $FFFF );
// Get the supported intents
@@ -163,6 +164,17 @@ begin
ComboBoxIntent.Items.EndUpdate;
end;
+
+
+procedure TForm1.ScrollBar1Change(Sender: TObject);
+var d: Integer;
+ s: String;
+begin
+ d := ScrollBar1.Position;
+ Str(d, s);
+ Label4.Caption := 'Adaptation state '+s + '% (Abs. col only)';
+end;
+
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenPictureDialog1.Execute then
@@ -190,6 +202,11 @@ begin
SelectedFile := Combo.Text;
end;
+procedure TForm1.ComboBoxIntentChange(Sender: TObject);
+begin
+ ScrollBar1.Enabled := (ComboBoxIntent.itemIndex = 3);
+end;
+
function TForm1.ComputeFlags: DWORD;
var
dwFlags: DWORD;
@@ -208,7 +225,7 @@ begin
case RadioGroup1.ItemIndex of
0:
dwFlags := dwFlags OR cmsFLAGS_NOOPTIMIZE;
- 2:
+ 1:
dwFlags := dwFlags OR cmsFLAGS_HIGHRESPRECALC;
3:
dwFlags := dwFlags OR cmsFLAGS_LOWRESPRECALC;
diff --git a/utils/tificc/tificc.c b/utils/tificc/tificc.c
index ec23d16..5615415 100644
--- a/utils/tificc/tificc.c
+++ b/utils/tificc/tificc.c
@@ -119,7 +119,7 @@ static int FromLabV2ToLabV4(int x)
{
int a;
- a = (x << 8 | x) >> 8; // * 257 / 256
+ a = ((x << 8) | x) >> 8; // * 257 / 256
if ( a > 0xffff) return 0xffff;
return a;
}