Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:sourceforge': 0.03; '16,': 0.03; 'subject:Python': 0.05; 'scipy': 0.05; 'url:bitbucket': 0.05; 'bits': 0.07; 'framework.': 0.07; 'implements': 0.07; 'pil': 0.07; 'pixel': 0.07; 'api': 0.09; 'python': 0.09; '===========': 0.09; 'buffer.': 0.09; 'c/c++': 0.09; 'compression': 0.09; 'curve': 0.09; 'experimental': 0.09; 'fork': 0.09; 'pep': 0.09; 'pil.': 0.09; 'subject:library': 0.09; 'subset': 0.09; 'to:addr:comp.lang.python': 0.09; 'wraps': 0.09; 'x86_64': 0.09; 'cc:addr:python-list': 0.10; 'thread': 0.11; 'static': 0.13; 'library': 0.15; 'stack': 0.15; '(unsigned)': 0.16; '2.7.3': 0.16; '3.3.': 0.16; 'apis.': 0.16; 'boxes)': 0.16; 'caching': 0.16; 'compiler,': 0.16; 'cons': 0.16; 'created.': 0.16; 'excerpt': 0.16; 'filters,': 0.16; 'filters.': 0.16; 'flavors': 0.16; 'formats.': 0.16; 'in-place': 0.16; 'install".': 0.16; "lot's": 0.16; 'numpy': 0.16; 'platform:': 0.16; 'resize': 0.16; 'resizing': 0.16; 'rotation': 0.16; 'sec': 0.16; 'subject:image': 0.16; 'unhappy': 0.16; 'zlib': 0.16; 'later': 0.16; 'documented': 0.17; 'drawing': 0.17; 'intel': 0.17; 'creates': 0.18; 'memory': 0.18; 'load': 0.19; 'mostly': 0.20; 'skip:= 10': 0.20; 'written': 0.20; '2000,': 0.22; 'amounts': 0.22; 'libraries': 0.22; 'skip:= 20': 0.22; 'trace': 0.22; 'cc:2**0': 0.23; 'example': 0.23; 'player': 0.23; 'cc:no real name:2**0': 0.24; 'feature': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'supported': 0.26; '(e.g.': 0.27; 'ago': 0.27; 'raw': 0.27; '2.6': 0.27; 'functions.': 0.27; 'integrate': 0.27; 'replace': 0.27; 'interface': 0.27; "doesn't": 0.28; 'correct': 0.28; 'lines': 0.28; 'comparison': 0.29; 'gil': 0.29; 'lot.': 0.29; 'prints': 0.29; 'restart': 0.29; 'convert': 0.29; 'integration': 0.29; 'points': 0.29; 'source': 0.29; "i'm": 0.29; 'week.': 0.30; 'writes': 0.30; 'compatible': 0.30; 'code': 0.31; 'file': 0.32; 'channel': 0.32; 'german': 0.32; 'support,': 0.32; "aren't": 0.33; 'int': 0.33; 'loading': 0.33; 'ram': 0.33; 'ubuntu': 0.33; 'zero': 0.33; 'skip:- 20': 0.34; 'received:google.com': 0.34; 'text': 0.34; 'project': 0.34; 'christian': 0.34; 'mapping': 0.35; 'camera': 0.65; 'multi': 0.65; 'due': 0.66; 'integrated': 0.66; 'contact': 0.68; 'color': 0.69; 'quality': 0.69; 'capabilities': 0.71; 'contrary': 0.71; 'obtained': 0.71; '100': 0.78; 'low': 0.83; 'bitmap': 0.84; 'books.': 0.84; 'complex,': 0.84; 'fast,': 0.84; 'float,': 0.84; 'gray': 0.84; 'nicely.': 0.84; 'proofing': 0.84; 'story:': 0.84; 'subject:color': 0.84; 'tone': 0.84; 'buildings': 0.91; 'faster.': 0.91; 'profiles': 0.91; 'subject:+': 0.93; 'hundred': 0.95 Newsgroups: comp.lang.python Date: Wed, 15 Aug 2012 16:25:09 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.192.83.145; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 123.192.83.145 MIME-Version: 1.0 Subject: Re: New image and color management library for Python 2+3 From: 88888 Dihedral To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 438 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345073119 news.xs4all.nl 6977 [2001:888:2000:d::a6]:41192 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27119 Christian Heimes=E6=96=BC 2012=E5=B9=B48=E6=9C=8815=E6=97=A5=E6=98=9F=E6=9C= =9F=E4=B8=89UTC+8=E4=B8=8A=E5=8D=882=E6=99=8222=E5=88=8654=E7=A7=92=E5=AF= =AB=E9=81=93=EF=BC=9A > Hello fellow Pythonistas, >=20 >=20 >=20 > I'm looking for co-developers, testers, documentation writers and users >=20 > for a new image library I created. The code is available at >=20 > https://bitbucket.org/tiran/smc.freeimage >=20 >=20 >=20 >=20 >=20 > Background story: >=20 > I'm working for a company that creates Python based solutions for >=20 > libraries -- these large buildings containg millions of books. One major >=20 > area of operation is the digitalization of books, prints and manuscripts >=20 > from the last millennium. We are a major player in the German speaking >=20 > countries with several hundred Terabytes of images on all our installatio= ns. >=20 >=20 >=20 > Several years ago I began to write a Python interface for FreeImage >=20 > because I was unhappy with the speed and capabilities of PIL. We had to >=20 > check and convert several hundred GB of TIFF images to up to 15 sizes >=20 > each and store them as JPEG every week. FreeImage offered more features >=20 > and speed. Cython made it possible to integrate FreeImage into our >=20 > software stack nicely. Later LittleCMS was integrated as color >=20 > management solution to convert images from the scanners' color space >=20 > into sRGB. >=20 >=20 >=20 > During the development of smc.freeimage I also created a fork of >=20 > FreeImage that wraps libjpeg-turbo instead of libjpeg. >=20 >=20 >=20 >=20 >=20 > In my opinion the project is useful for other people because it has some >=20 > benefits over PIL. For example it supports modern file formats that >=20 > aren't supported by PIL, for example JPEG 2000, HDR formats and RAW >=20 > camera formats. Contrary to PIL it even supports G3 and G4 compressed >=20 > TIIFs as well as multipage TIFFs. In some areas it's also much faster >=20 > than PIL, especially JPEG performance and NumPy buffer access. >=20 >=20 >=20 > However it's not going to replace PIL as neither FreeImage nor my code >=20 > supports drawing, text composition or extended filters. >=20 >=20 >=20 >=20 >=20 > Excerpt from the README: >=20 >=20 >=20 > Features of FreeImage >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 > FreeImage wraps mature and widely-used libraries like LibJPEG, >=20 > LibOpenJPEG,LibPNG, LibRaw, LibTIFF4, OpenEXR and zlib in a consistent, >=20 > well documented and powerful set of APIs. >=20 >=20 >=20 > http://freeimage.sourceforge.net/ >=20 >=20 >=20 > Reading of 35 file formats and writing of more than 19 file formats as >=20 > of FreeImage 3.15.3, including JPEG 2000, multiple subformats of TIFF >=20 > with G3/G4 fax compression and JPEG subsampling. >=20 >=20 >=20 > pixel depths from 1-32 bpp standard images up to formats like RGBAF and >=20 > 2x64complex. >=20 >=20 >=20 > multi page images >=20 >=20 >=20 > Metadata (e.g. EXIF, IPTC/NAA, GeoTIFF, XMP) and ICC >=20 >=20 >=20 > Color adjustment, conversion and channel processing >=20 >=20 >=20 > Image resizing and rotation >=20 >=20 >=20 > High Dynamic Range (HDR) image processing and tone mapping >=20 >=20 >=20 > RAW camera files >=20 >=20 >=20 > Contrary to PIL it doesn't contain advanced image filters or drawing >=20 > functions. FreeImage focuses on file formats >=20 >=20 >=20 >=20 >=20 > Features of LCMS2 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 > LCMS2 is a color management engine that implements V2 and V4 ICC >=20 > profiles up to V4.3. It supports transformation, proofing and >=20 > introspection of profiles for a large variety of color formats and target= s. >=20 >=20 >=20 > http://www.littlecms.com/ >=20 >=20 >=20 >=20 >=20 > Features of smc.freeimage >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >=20 >=20 >=20 > smc.freeimage is developed as part of the closed source Visual Library >=20 > framework. >=20 >=20 >=20 > mostly written with Cython with some lines of handwritten C Code and >=20 > some Python helpers. >=20 >=20 >=20 > fast, it avoids copying large amounts of data and releases the GIL >=20 > whenever possible. >=20 >=20 >=20 > 64bit safe, tested on i386/X86 and AMD64/X86_64 systems >=20 >=20 >=20 > thread safe >=20 >=20 >=20 > wraps a large subset of FreeImage features >=20 >=20 >=20 > Compatible with Python 2.6 to 3.3. >=20 >=20 >=20 >=20 >=20 > Performance >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 > smc.freeimage with libjpeg-turbo read JPEGs about three to six times >=20 > faster than PIL and writes JPEGs more than five times faster. >=20 >=20 >=20 > JPEG's restart markers are not compatible with libjpeg-turbo's Huffman >=20 > decoder optimization and reduce performance a lot. Please read the >=20 > section "Restart Makers" on the page >=20 > http://www.libjpeg-turbo.org/About/Performance for more information. >=20 >=20 >=20 > Python 2.7.3 >=20 > read / write cycles: 300 >=20 > test image: 1210x1778 24bpp JPEG (pon.jpg) >=20 > platform: Ubuntu 12.04 X86_64 >=20 > hardware: Intel Xeon hexacore W3680@3.33GHz with 24 GB RAM >=20 >=20 >=20 > smc.freeimage, FreeImage 3.15.3 standard >=20 > - read JPEG 12.857 sec >=20 > - read JPEG 6.629 sec (resaved) >=20 > - write JPEG 21.817 sec >=20 > smc.freeimage, FreeImage 3.15.3 with jpeg turbo >=20 > - read JPEG 9.297 sec >=20 > - read JPEG 3.909 sec (resaved) >=20 > - write JPEG 5.857 sec >=20 > - read LZW TIFF 17.947 sec >=20 > - read biton G4 TIFF 2.068 sec >=20 > - resize 3.850 sec (box) >=20 > - resize 5.022 sec (bilinear) >=20 > - resize 7.942 sec (bspline) >=20 > - resize 7.222 sec (bicubic) >=20 > - resize 7.941 sec (catmull rom spline) >=20 > - resize 10.232 sec (lanczos3) >=20 > - tiff numpy.asarray() with bytescale() 0.006 sec >=20 > - tiff load + numpy.asarray() with bytescale() 18.043 sec >=20 > PIL 1.1.7 >=20 > - read JPEG 30.389 sec >=20 > - read JPEG 23.118 sec (resaved) >=20 > - write JPEG 34.405 sec >=20 > - read LZW TIFF 21.596 sec >=20 > - read biton G4 TIFF: decoder group4 not available >=20 > - resize 0.032 sec (nearest) >=20 > - resize 1.074 sec (bilinear) >=20 > - resize 2.924 sec (bicubic) >=20 > - resize 8.056 sec (antialias) >=20 > - tiff scipy fromimage() with bytescale() 1.165 sec >=20 > - tiff scipy imread() with bytescale() 22.939 sec >=20 >=20 >=20 >=20 >=20 > Comparison to PIL (Pros and Cons) >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 > Pros of smc.freeimage >=20 > --------------------- >=20 >=20 >=20 > Faster! JPEG performance is about 3 to 6 times faster than PIL, numpy >=20 > buffer access is more than 100 times faster and consumes less memory due >=20 > to zero copy design. >=20 >=20 >=20 > Modern file formats! smc.freeimage supports JPEG 2000, HDR and EXR high >=20 > dynamic range images and raw camera data (RAW). >=20 >=20 >=20 > Full baseline TIFF support! Contrary to PIL smc.freeimage supports all >=20 > flavors of baseline TIFF like G3 and G4 compression and multipage TIFFs. >=20 >=20 >=20 > PEP 3118 buffer interface that exports images as 2d or 3d non-contiguous >=20 > buffer. >=20 >=20 >=20 > Correct and optimized integration of a color management system >=20 > (LittleCMS2)instead of lcms1 integration including caching of optimized >=20 > transformations, in-place transformation and introspection of profiles. >=20 >=20 >=20 > Structured metadata access to EXIF, XMP and IPTC information, also >=20 > supports fast loading of metadata without loading pixel data. >=20 >=20 >=20 > Lot's of color types! Bitmap (8bit) with 1, 4, 8, 16, 24 and 32 bits per >=20 > pixel, (unsigned) int 16 and 32, float, double gray scale, complex, RGBA >=20 > 16bit and RGBA floats. >=20 >=20 >=20 > Static build support, no need for "make install". You just need a C99 >=20 > compatible C/C++ compiler, make and nasm (for FreeImage-Turob). >=20 >=20 >=20 >=20 >=20 > Cons of smc.freeimage >=20 > ---------------------- >=20 >=20 >=20 > Few image filters, no support for complex image filters in FreeImage >=20 >=20 >=20 > Low quality resize filters are slower than PIL's filters >=20 >=20 >=20 > No drawing API for primitives (lines, circles, boxes) >=20 >=20 >=20 > No text drawing support and libfreetype integration. >=20 >=20 >=20 > Still not feature complete and under development. >=20 >=20 >=20 >=20 >=20 > FreeImage + libjpeg-turbo >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >=20 >=20 >=20 > An experimental fork of FreeImage with libjpeg-turbo is available at >=20 > https://bitbucket.org/tiran/freeimageturbo >=20 >=20 >=20 >=20 >=20 > Feel free to contact me if you are interested in the library or want to >=20 > get involved! >=20 >=20 >=20 > Christian Do you need to work out edge dection maps that trace edge contours to be s= callable funtional curves from control points obtained after image segmentations? curve by control points from=20