⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libtiffdelphi.pas

📁 打开TIFF文件
💻 PAS
📖 第 1 页 / 共 5 页
字号:

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_dirread.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_dirread.obj}
{$ENDIF}

{tif_dir}

procedure TIFFFreeDirectory(tif: Pointer); cdecl; external;
function  TIFFDefaultDirectory(tif: Pointer): Integer; cdecl; external;
function  TIFFReassignTagToIgnore(task: Integer; TIFFtagID: Integer): Integer; cdecl; external;
procedure _TIFFsetString(cpp: Pointer; cp: Pointer); cdecl; external;
procedure _TIFFsetByteArray(vpp: Pointer; vp: Pointer; n: Integer); cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_dir.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_dir.obj}
{$ENDIF}

{tif_aux}

function  TIFFVGetFieldDefaulted(tif: Pointer; tag: Cardinal; ap: Pointer): Integer; cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_aux.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_aux.obj}
{$ENDIF}

{tif_color}

procedure TIFFCIELabToXYZ(cielab: Pointer; l: Cardinal; a: Integer; b: Integer; X: Pointer; Y: Pointer; Z: Pointer); cdecl; external;
procedure TIFFXYZToRGB(cielab: Pointer; X: Single; Y: Single; Z: Single; r: Pointer; g: Pointer; b: Pointer); cdecl; external;
procedure TIFFYCbCrtoRGB(ycbcr: Pointer; Y: Cardinal; Cb: Integer; Cr: Integer; r: Pointer; g: Pointer; b: Pointer); cdecl; external;
function  TIFFYCbCrToRGBInit(ycbcr: Pointer; luma: Pointer; refBlackWhite: Pointer): Integer; cdecl; external;
function  TIFFCIELabToRGBInit(cielab: Pointer; display: Pointer; refWhite: Pointer): Integer; cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_color.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_color.obj}
{$ENDIF}

{tif_close}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_close.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_close.obj}
{$ENDIF}

{tif_extension}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_extension.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_extension.obj}
{$ENDIF}

{tif_open}

function  _TIFFgetMode(mode: PChar; module: PChar): Integer; cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_open.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_open.obj}
{$ENDIF}

{tif_getimage}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_getimage.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_getimage.obj}
{$ENDIF}

{tif_predict}

function  TIFFPredictorInit(tif: PTIFF): Integer; cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_predict.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_predict.obj}
{$ENDIF}

{tif_print}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_print.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_print.obj}
{$ENDIF}

{tif_error}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_error.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_error.obj}
{$ENDIF}

{tif_strip}

function  _TIFFDefaultStripSize(tif: Pointer; s: Cardinal): Cardinal; cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_strip.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_strip.obj}
{$ENDIF}

{tif_swab}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_swab.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_swab.obj}
{$ENDIF}

{tif_tile}

function  TIFFCheckTile(tif: Pointer; x: Cardinal; y: Cardinal; z: Cardinal; s: Word): Integer; cdecl; external;
procedure _TIFFDefaultTileSize(tif: Pointer; tw: Pointer; th: Pointer); cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_tile.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_tile.obj}
{$ENDIF}

{tif_warning}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_warning.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_warning.obj}
{$ENDIF}

{tif_fax3}

function  TIFFInitCCITTRLE(tif: PTIFF; scheme: Integer): Integer; cdecl; external;
function  TIFFInitCCITTRLEW(tif: PTIFF; scheme: Integer): Integer; cdecl; external;
function  TIFFInitCCITTFax3(tif: PTIFF; scheme: Integer): Integer; cdecl; external;
function  TIFFInitCCITTFax4(tif: PTIFF; scheme: Integer): Integer; cdecl; external;

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_fax3.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_fax3.obj}
{$ENDIF}

{tif_fax3sm}

{$IFDEF LIBTIFF_DEBUG}
{$L LibTiffDelphi\debug\tif_fax3sm.obj}
{$ELSE}
{$L LibTiffDelphi\release\tif_fax3sm.obj}
{$ENDIF}

{tif_jpeg}

procedure TIFFjpeg_error_exit_raise; cdecl;
begin
  raise Exception.Create('TIFFjpeg_error_exit');
end;

function TIFFcallvjpeg_jpeg_CreateCompress(cinfo: Pointer; version: Integer; structsize: Cardinal): Integer; cdecl;
begin
  try
    jpeg_CreateCompress(cinfo,version,structsize);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_CreateDecompress(cinfo: Pointer; version: Integer; structsize: Cardinal): Integer; cdecl;
begin
  try
    jpeg_CreateDecompress(cinfo,version,structsize);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_set_defaults(cinfo: Pointer): Integer; cdecl;
begin
  try
    jpeg_set_defaults(cinfo);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_set_colorspace(cinfo: Pointer; colorspace: Integer): Integer; cdecl;
begin
  try
    jpeg_set_colorspace(cinfo,colorspace);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_set_quality(cinfo: Pointer; quality: Integer; force_baseline: Byte): Integer; cdecl;
begin
  try
    jpeg_set_quality(cinfo,quality,force_baseline);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_suppress_tables(cinfo: PRJpegCompressStruct; suppress: Byte): Integer; cdecl;
begin
  try
    jpeg_suppress_tables(cinfo,suppress);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_start_compress(cinfo: PRJpegCompressStruct; write_all_tables: Byte): Integer; cdecl;
begin
  try
    jpeg_start_compress(cinfo,write_all_tables);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcalljpeg_jpeg_write_scanlines(errreturn: Integer; cinfo: PRJpegCompressStruct; scanlines: Pointer; num_lines: Cardinal): Integer; cdecl;
begin
  try
    Result:=jpeg_write_scanlines(cinfo,scanlines,num_lines);
  except
    Result:=errreturn;
  end;
end;

function TIFFcalljpeg_jpeg_write_raw_data(errreturn: Integer; cinfo: PRJpegCompressStruct; data: Pointer; num_lines: Cardinal): Integer; cdecl;
begin
  try
    Result:=jpeg_write_raw_data(cinfo,data,num_lines);
  except
    Result:=errreturn;
  end;
end;

function TIFFcallvjpeg_jpeg_finish_compress(cinfo: PRJpegCompressStruct): Integer; cdecl;
begin
  try
    jpeg_finish_compress(cinfo);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcallvjpeg_jpeg_write_tables(cinfo: PRJpegCompressStruct): Integer; cdecl;
begin
  try
    jpeg_write_tables(cinfo);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcalljpeg_jpeg_read_header(errreturn: Integer; cinfo: PRJpegDecompressStruct; require_image: Byte): Integer; cdecl;
begin
  try
    Result:=jpeg_read_header(cinfo,Boolean(require_image));
  except
    Result:=errreturn;
  end;
end;

function TIFFcallvjpeg_jpeg_start_decompress(cinfo: PRJpegDecompressStruct): Integer; cdecl;
begin
  try
    jpeg_start_decompress(cinfo);
    Result:=1;
  except
    Result:=0;
  end;
end;

function TIFFcalljpeg_jpeg_read_scanlines(errreturn: Integer; cinfo: PRJpegDecompressStruct; scanlines: Pointer; max_lines: Cardinal): Integer; cdecl;
begin
  try
    Result:=jpeg_read_scanlines(cinfo,scanlines,max_lines);
  except
    Result:=errreturn;
  end;
end;

function TIFFcalljpeg_jpeg_read_raw_data(errreturn: Integer; cinfo: PRJpegDecompressStruct; data: Pointer; max_lines: Cardinal): Integer; cdecl;
begin
  try
    Result:=jpeg_read_raw_data(cinfo,data,max_lines);
  except
    Result:=errreturn;
  end;
end;

function TIFFcalljpeg_jpeg_finish_decompress(errreturn: Integer; cinfo: PRJpegDecompressStruct): Integer; cdecl;
begin
  try
    Result:=jpeg_finish_decompress(cinfo);
  except
    Result:=errreturn;
  end;
end;

function TIFFcallvjpeg_jpeg_abort(cinfo: PRJpegCommonStruct): Integer; cdecl;
begin
  try
    jpeg_abort(cinfo);
    Result:=1;
  except
    Result:=0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -