Re: [Gimp-developer] Compiling LibOpenJPEG using MINGW/MSYS
What you need to do is to *port* the code to use what's available on Windows instead of the functionality declared in the missing header files. Of course, it is highly likely that a library like openjpeg intended to be generally usable and cross-platform already *is* portable to Windows. And indeed it is. It's just that only project files for MSVC are provided. Furthermore, openjpeg uses a hardcoded Makefile for Unix-like compilation. no configure scripts etc, which is a bit sad. But openjpeg is far from complex and it was trivial to modify the Unix Makefile to work with mingw. Took some fifteen minutes. There is no comprehensive test suite, but I tried building the two programs in the codec folder and they seemed to work, converting a TIFF image to JPEG2000 and back to TIFF. The JPEG2000 image also loaded fine into IrfanView. Patch included below, as I don't think attachments make it through this mailing list. The patch simply adds two files, Makefile.mingw and codec/Makefile.mingw, and adds the targets mingw, mingwinstall and mingwclean to the main Makefile. I build only a shared library (DLL) in Makefile.mingw. Building a static library is left as an exercise to the interested. BTW, why does the code bother to use the stdcall calling convention? Isn't stdcall kinda a historical artefact of dubious value for new code? But oh well, I didn't bother to change that. --tml diff -ru ../1.3.orig/codec/Makefile.mingw ./codec/Makefile.mingw --- ../1.3.orig/codec/Makefile.mingw2008-10-28 12:27:23.50900 +0200 +++ ./codec/Makefile.mingw 2008-10-28 12:24:06.66550 +0200 @@ -0,0 +1,16 @@ +# Makefile for the main OpenJPEG codecs: j2k_to_image and image_to_j2k + +CFLAGS = -O3 + +TIFF = /devel/dist/win32/tiff-3.8.2-1 + +all: j2k_to_image.exe image_to_j2k.exe + +j2k_to_image.exe: j2k_to_image.c ../libopenjpeg-2.dll.a + gcc $(CFLAGS) compat/getopt.c index.c convert.c j2k_to_image.c -o j2k_to_image -L.. -lopenjpeg-2 -I ../libopenjpeg -L$(TIFF)/lib -ltiff + +image_to_j2k.exe: image_to_j2k.c ../libopenjpeg-2.dll.a + gcc $(CFLAGS) compat/getopt.c index.c convert.c image_to_j2k.c -o image_to_j2k -L.. -lopenjpeg-2 -I ../libopenjpeg -L$(TIFF)/lib -ltiff + +clean: + rm -f j2k_to_image image_to_j2k diff -ru ../1.3.orig/Makefile ./Makefile --- ../1.3.orig/Makefile2007-12-21 12:39:41.0 +0200 +++ ./Makefile 2008-10-28 12:12:18.149875000 +0200 @@ -76,3 +76,13 @@ osxclean: make -f Makefile.osx clean + +mingw: + make -f Makefile.mingw + +mingwinstall: + make -f Makefile.mingw install + +mingwclean: + make -f Makefile.mingw clean + diff -ru ../1.3.orig/Makefile.mingw ./Makefile.mingw --- ../1.3.orig/Makefile.mingw 2008-10-28 12:27:29.19600 +0200 +++ ./Makefile.mingw2008-10-28 12:37:06.681125000 +0200 @@ -0,0 +1,54 @@ +# MinGW (i.e. GNU toolchain targeting Win32) makefile for OpenJPEG + +VER_MAJOR = 2 +VER_MINOR = 1.3.0 + +SRCS = ./libopenjpeg/bio.c ./libopenjpeg/cio.c ./libopenjpeg/dwt.c ./libopenjpeg/event.c ./libopenjpeg/image.c ./libopenjpeg/j2k.c ./libopenjpeg/j2k_lib.c ./libopenjpeg/jp2.c ./libopenjpeg/jpt.c ./libopenjpeg/mct.c ./libopenjpeg/mqc.c ./libopenjpeg/openjpeg.c ./libopenjpeg/pi.c ./libopenjpeg/raw.c ./libopenjpeg/t1.c ./libopenjpeg/t2.c ./libopenjpeg/tcd.c ./libopenjpeg/tgt.c +INCLS = ./libopenjpeg/bio.h ./libopenjpeg/cio.h ./libopenjpeg/dwt.h ./libopenjpeg/event.h ./libopenjpeg/fix.h ./libopenjpeg/image.h ./libopenjpeg/int.h ./libopenjpeg/j2k.h ./libopenjpeg/j2k_lib.h ./libopenjpeg/jp2.h ./libopenjpeg/jpt.h ./libopenjpeg/mct.h ./libopenjpeg/mqc.h ./libopenjpeg/openjpeg.h ./libopenjpeg/pi.h ./libopenjpeg/raw.h ./libopenjpeg/t1.h ./libopenjpeg/t2.h ./libopenjpeg/tcd.h ./libopenjpeg/tgt.h ./libopenjpeg/opj_malloc.h ./libopenjpeg/opj_includes.h +INCLUDE = -Ilibopenjpeg + +# General configuration variables: +CC = gcc +AR = ar + +PREFIX = /dummy +INSTALL_BINDIR = $(PREFIX)/bin +INSTALL_LIBDIR = $(PREFIX)/lib +INSTALL_INCLUDE = $(PREFIX)/include + +COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -DWIN32 -DOPJ_EXPORTS + +MODULES = $(SRCS:.c=.o) +CFLAGS = $(COMPILERFLAGS) $(INCLUDE) + +TARGET = openjpeg +SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dll +IMPLIB = lib$(TARGET)-$(VER_MAJOR).dll.a + + +default: all + +all: OpenJPEG + +dist: OpenJPEG + install -d dist + install $(SHAREDLIB) dist + install $(IMPLIB) dist + install libopenjpeg/openjpeg.h dist + +OpenJPEG: $(SHAREDLIB) + +.c.o: + $(CC) $(CFLAGS) -c $ -o $@ + +$(SHAREDLIB): $(MODULES) + $(CC) -shared -o $@ -Wl,--out-implib,$(IMPLIB) $(MODULES) $(LIBRARIES) + +install: OpenJPEG + install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)' + install $(SHAREDLIB) '$(DESTDIR)$(INSTALL_BINDIR)' + install $(IMPLIB) '$(DESTDIR)$(INSTALL_LIBDIR)' + install libopenjpeg/openjpeg.h '$(DESTDIR)$(INSTALL_INCLUDE)' + +clean: + rm -rf dist u2dtmp* $(MODULES) $(SHAREDLIB) $(IMPLIB)
Re: [Gimp-developer] Compiling LibOpenJPEG using MINGW/MSYS
it was trivial to modify the Unix Makefile to work with mingw. Took some fifteen minutes. That said, as there already *are* official Windows binaries (including a DLL) of libopenjpeg available from the openjpeg.org site, why not use that instead of compiling an own build? My personal opinion has always been that one should use official DLLs when available and usable. That the OpenJPEG.dll evidently is linked with a static unknown C library and not the msvcrt.dll that mingw-compiled code uses should not be of any harm here, as the libopenjpeg API doesn't seem to pass any references to data inside the C library (like file descriptors, including those in FILE structs). Sure, the openjpeg_v1_3_win32.zip contains no import library for the GNU toolchain, just the MS import library OpenJPEG.lib. But it should be trivial to generate a .def file from the DLL with the pexports command, and then an import library from the .def file with the dlltool command (both part of mingw). --tml ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] new jpg2000 plugin
Hy i just try the plugin on windows XP jpg2000 has subcategories at least my viewers,Xnview display 2 options to save as jpg2000. 1 JPG2-LuraWawe-JPEG-2000-Format and 2 JG2-JPEG-2000-JPG2-File-Format The plugin open successfully preview and the file ONLY for type 1 LuraWawe Type 2 dispay no preview, when i try to open the file issue this error message JP2 image plug-in returned SUCCESS but did not return an image Scopri il blog di Yahoo! Mail: Trucchi, novità e scrivi la tua opinione. http://www.ymailblogit.com/blog ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] new jpg2000 plugin
Hy i just try the plugin on windows XP jpg2000 has subcategories at least my viewers,Xnview display 2 options to save as jpg2000. 1 JPG2-LuraWawe-JPEG-2000-Format and 2 JG2-JPEG-2000-JPG2-File-Format The plugin open successfully preview and the file ONLY for type 1 LuraWawe Type 2 dispay no preview, when i try to open the file issue this error message JP2 image plug-in returned SUCCESS but did not return an image Hi, I think the error message is misleading. I don't think this has anything to do with LuraWave, which is a commercial optimised j2k implementation. There are two types of JPEG-2000 files. 1. Minimalistic code streams or .j2k files. 2. An extended format with additional header information (usually saved as .jp2 files) The current implementation saves only the code streams (.j2k files). The current implementation could be enhanced to support the additional format, if anyone needs this capability. We only need codestreams, so that's all I've implemented for now. Regards, Steve. mail2web.com Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Zoom behavior on off-center repetitive click + ctrl-click (Windows 2.6.1)
Alec Burgess wrote: Invoke Zoom tool, press Ctrl+Click five times and image gets smaller and smaller and disappears upper left. see 15 second video here: http://screencast.com/t/6gFRuN0yn Not shown in video, but with mouse in same (upper left quadrant) position, click (not ctr l+click) five times and image starts growing and starts disappearing lower right. Hi This bug [1] is now fixed and the fix will be included in GIMP 2.6.2. BR, Martin [1] Bug 556603 – Zoom region always zooms in center of image http://bugzilla.gnome.org/show_bug.cgi?id=556603 ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Bugs 61019 and 421211 on FOSS Factory
Hi all, FOSS Factory is making a business of aggregating sponsorship for Open Source projects. To get the ball rolling, they asked me to select some GIMP bugs and link them to FOSS Factory projects. I have done that for the following bugs: GIMP Bug 61019 – add a 'lock' flag per layer to protect it http://www.fossfactory.org/project.php?p=p131 GIMP Bug 421211 – add a pop-up loupe http://www.fossfactory.org/project.php?p=p132 I also posted this information to the bugzilla pages, so everyone interested in these particular bugs has been notified. Hopefully this will attract a bit of money that will attract a new or existing developer to these long-standing enhancement requests. Cheers, Tom -- -- Tom Rathborne -- I have a theory that it's impossible to prove anything, but I can't prove it. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer