Vampyre Imaging Library Forum

Imaging Category => Bugs And Other Insects => Topic started by: jus on 21 June 2011, 01:19:57

Title: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jus on 21 June 2011, 01:19:57
Hi,
   I'm using the latest vampyre trunk and Lazarus 0.9.31 (FPC 2.4.2) under Mac OSX 10.6 and I have just noticed that DetermineFileFormat,DetermineStreamFormat don't work for TIF files. The result string is empty. It works for JPG, but not for TIF.

Edit:
It seems that there is not only a with DetermineStreamFormat, but with loading tiff in Max OSX.

Kindly regards,
jus
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Galfar on 5 July 2011, 17:59:49
Hi, TIFF support in Imaging is provided by LibTiffDelphi library that uses precompiled
libtiff C library. Unfortunately, that's only available for Delphi.
There's test version of GCC compiled libtiff for Imaging in this thread (http://galfar.vevb.net/imaging/smf/index.php/topic,273.0.html) that's usable in Lazarus.
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jsj on 30 April 2012, 00:19:00
I was made gcc compiling libtiff under win gcc (mingw32).
Tiff's are loaded.

But under Mac OS don't work.
"Linking error
Id: symbol(s) not found for architecture i386"

I try to use as mingw32 obj's as mac gcc obj's.
Don't work ;(

Any ideas?
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jsj on 4 May 2012, 22:13:30
Everything allright.
Tifflib under mac os is working! =)
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jsj on 8 May 2012, 00:52:21
Just use "-arch i386" parameter to compile tifflib object files
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Galfar on 15 May 2012, 12:26:08
Could you please check if TIFFs with JPEG compression are working with TiffLib compiled for MacOS?
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jus on 16 May 2012, 17:40:54
Quote from: jsj on  8 May 2012, 00:52:21
Just use "-arch i386" parameter to compile tifflib object files


Hi jsj,

  I'm very insterested in using Tifflib. The problem is that I'm not very familiar with compiling c++ files. Could you please provide some more detailed information how to build such a tifflib to use it in vampyre lib? And where/which version did you use to compile? I have tried to load the libtiff source code (http://www.libtiff.org) into xcode, but it didn't worked.  :(

jus
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jsj on 20 May 2012, 18:38:49
Galfar,
Tiff with jpeg codec dont supported by default (even under win32 lazarus, i cant tested it under delphi).
As I understand - tifflib must be compeled with -jpeglib parameters...

Jus, I recompiled the new imaginglib with tifflib 3.9.4
Under win32 - everything works, but under the macos - the same error again...
(ld: symbol(s) not found for architecture i386)
Maybe somebody know how to get more info from linker?
The worst thing - I seem to have forgotten the keys that I have compiled tifflib 3.9.1 (
And now again I try to resolve this problem...


PS: I can't register at this forum - get error
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Galfar on 20 May 2012, 20:24:43
Quote from: jsj on 20 May 2012, 18:38:49
PS: I can't register at this forum - get error

Please try again now.
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jsj on 21 May 2012, 23:31:36
Galfar, registration was successful =)

About tifflib under Mac - I forget compilation keys, but I have already compiled tifflib 3.9.1 under mac.
I will upload it... soon...

But with tifflib 3.9.4 under macos I have a problem..
I was build obj files for i386 architechture, but for success compilation need {$Linklib libtiff} and libtiff.a - x86-64 architechture somehow (i view it by otool)

Therefore I need correct compilation keys.
Now I compile tifflib as:

./configure CFLAGS="-arch i386"
make

But it not enough...

PS: sorry my english, but i think you understand me))
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Galfar on 1 June 2012, 21:56:57
jsj,
seems like the problem is not in GCC, or at least not in CPU architecture.

I did some experiments and the static lib (libtiff.a) produced by GCC is different
when you use "-arch i386" than with no flags. 64bit one is roughly 2x bigger in size
than 32bit one.

Also FPC gives this message:
ld: warning: ignoring file ./libtiff64.a, file was built for archive which is not the architecture being linked (i386)
when trying to link to x86_64 library.
This message is not displayed when linking library generated with "-arch i386".

Anyway, for both libraries linking always ends with:
Undefined symbols for architecture i386:
  "_TiffGetVersion", referenced from:

Maybe symbols are not properly exported or something :(
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: jsj on 10 June 2012, 19:48:45
I dont have any time to explore compiler flags, now.
I just copy here my compiled old version (3.9.1, but adaptated for 3.9.4 pas unit)

I hope that soon will deal with this.

PS: Some explanations for this version.
This code work as Windows as MacOsX.
There is two libtiff.a in pack.
libtiff.a - for mac os
libtiff-win.a - for windows (for compile - rename it to libtiff.a)

PPS: For compiling I use this link :
  http://www.kyngchaos.com/macosx/build/libtiff
  (some compiler flags are here)
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Mauricio on 26 March 2013, 11:02:13
Hi,

i will try this on Delphi XE3 today.

Mauricio
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Mauricio on 26 March 2013, 11:27:37
Hi again,

i have tryied compiling from Delphi XE3 to macOSX with extensions.zip files above.

I have the following errors on LibTiffDelphi.pas :


line 3:
  {$Linklib libtiff}
Says: invalid compiler directive 'Linklib'


line 564: (last line)
Says: Bad object file format : 'D:\_DELPHI XE3\_COMPONENTS\Vampyre\Extras\Extensions\LibTiff\Compiled\macosx\jmemnobs.o'

Please, help me.
Mauricio
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Galfar on 3 March 2014, 17:42:53
I've been working on TIFF loader/saver for Imaging that won't need LibTiff as compiled objects
so in few weeks there will be TIFF support on more platforms (and LibTiff only as an option).
Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: CorBee on 21 November 2014, 16:14:01
Hi,

I just downloaded the latest Vampyre library but see that the support for TIFF under Lazarus was not added. Any idea when this will be added to this great library ?

Thanks,

regards
CorBee

*************************************************
RegiStax Free Image Processing Software
http://www.astronomie.be/registax
*************************************************

Title: Re: vampyre can't load Tiff under Lazarus Mac OSX
Post by: Galfar on 2 December 2014, 16:25:24
Unfortunately, I only had enough time to add TIFF support for Win64 and Linux for Imaging version for Deskew (http://galfar.vevb.net/wp/2014/deskew-tool-version-1-10/).
OSX support was nearly finished but I have no idea when I will be able to finish it.