• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

libtiff 3.9.4 extension for fpc.

Started by nomas, 12 December 2013, 08:53:54

Previous topic - Next topic

nomas

Long time passed for FPC release  :P

I have some modification for FPC and remove dependency 'windows' unit.
but only for 32bit. If you use in 64bit there is a some modification needed in C source files.
Many of parameters defined longint in C sources.

There is a 'makeobjs-gcc.bat' in archive file, you can recompile object files. I'm using 'mingw' gcc.

It compiled ok in FPC 2.7.1


nomas

Tiff's Jpeg codec is not work  :(

libtiff 4.0.3 apply for FPC  :D


Galfar

Thanks for this work.

I want to include your LibTiffDelphi FPC modification in Imaging's repository (in Extras\Contrib).
But now I'm little confused what parts of which archive are needed.

Are compiled object files and *.pas files from 4.0.3 archive enough?

nomas

16 December 2013, 07:40:55 #3 Last Edit: 16 December 2013, 07:59:46 by nomas
Quote from: Galfar on 16 December 2013, 00:37:44
Thanks for this work.

I want to include your LibTiffDelphi FPC modification in Imaging's repository (in Extras\Contrib).
But now I'm little confused what parts of which archive are needed.

Are compiled object files and *.pas files from 4.0.3 archive enough?


I worked on libtiff 4.0.3 base. libtiff 3.9.4 archives pas source is not work on 4.0.3 there is some changes.

I have new one for fpc fpc 64bit support.  :)

Revised some functions(sprintf) for FPC(pointer problem). now Error message was shown correctly.

mingw 11.4 is used for object compiling.
http://nuwen.net/mingw.html

I have still problem on jpeg codec.

nomas

Only o files there. works on FPC only.  :-[

nomas

28 December 2013, 20:24:17 #5 Last Edit: 29 December 2013, 03:29:11 by nomas
In Libdelphi.pas,


procedure memset(a: Pointer; b: Integer; c: PtrUInt); cdecl;
begin
  system.FillChar(a^,c,b); // swap "b" and "c"
end;


Now It works fine  :)

Also changes in Imaginglibtiffdelphi.pas,


      TiffResult := TIFFReadRGBAImageOriented(Tiff, Images[Idx].Width, Images[Idx].Height,
        Images[Idx].Bits, Orientation, 0);
      if TiffResult = 0 then
        RaiseImaging(LastError, []);
      // swap Red and Blue, if YCbCr.
      if Photometric=PHOTOMETRIC_YCBCR then
        SwapChannels(Images[Idx],ChannelRed,ChannelBlue);       



Galfar

Precompiled LibTiff for FPC has been finally added to Imaging for Win32 and Win64.
In Linux it's now using dynamic linking to libtiff since there it's already installed on most systems or simple to install where not.


Mac User

Great library!

Have you planned a TIFF support also for FPC on Mac OS?

And what have to be done to do that? Isn't the LibTiff compilation also working on the Mac? Or is it very different to Windows or Linux?

Galfar

It's not very different but the the end result does not work yet :( There are crashes that I have not yet figured out.

What works fine in MacOS now is dynamic linking to libtiff like in Linux. It's not enabled by default though
since I guess not many Mac users have libtiff installed (contrary to Linux situation).

Mac User

Very good to hear that you are working on a solution.

Yes, I think so, too. Then it is much better to use the solution like Windows than relying on an external library.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk