[GEM-dev] TIFF files from pix_buffer (and others?) missing some "standard" tags?

B. Bogart ben at ekran.org
Fri Nov 7 19:37:44 CET 2008


After enabling imagemagick:

saved TIFs are no longer Y flipped and are PIL readable.

saving a YUV buffer to tif crashes PD:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7d0e6b0 (LWP 31986)]
0xb7faf424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7faf424 in __kernel_vsyscall ()
#1  0xb7d3b640 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb7d3d018 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb7114928 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/libstdc++.so.6
#4  0xb7112805 in ?? () from /usr/lib/libstdc++.so.6
#5  0xb7112842 in std::terminate () from /usr/lib/libstdc++.so.6
#6  0xb711297a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7  0xb70aa94f in std::__throw_logic_error () from /usr/lib/libstdc++.so.6
#8  0xb70ee88a in ?? () from /usr/lib/libstdc++.so.6
#9  0xb70ee986 in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
#10 0xb7b6b532 in mem2magickImage () from ./Gem.pd_linux
#11 0xb7b6b833 in mem2image () from ./Gem.pd_linux
#12 0xb7bd14ee in pix_buffer::saveMess () from ./Gem.pd_linux
#13 0xb7bd0fb5 in pix_buffer::saveMessCallback () from ./Gem.pd_linux
#14 0x080afdea in pd_typedmess (x=0x9259350, s=0x91ace80, argc=2,
    argv=0x812a590) at m_class.c:781
#15 0x080b221f in outlet_anything (x=0x94ada08, s=0x91ace80, argc=2,
    argv=0x812a590) at m_obj.c:439
#16 0x080af9ab in pd_typedmess (x=0x937a28c, s=0x91ace80, argc=2,
    argv=0x812a590) at m_class.c:800
#17 0x080b5963 in binbuf_eval (x=0x925af40, target=0x937a28c, argc=1,
---Type <return> to continue, or q <return> to quit---
    argv=0xbfbc90cc) at m_binbuf.c:677
#18 0x0806370b in message_click (x=0x937a270, xpos=460, ypos=421, shift=0,
    ctrl=0, alt=0) at g_text.c:308
#19 0x080686d0 in text_click (z=0x937a270, glist=0x937bf50, xpix=460,
    ypix=421, shift=0, alt=0, dbl=0, doit=1) at g_text.c:1091
#20 0x0808df40 in canvas_doclick (x=0x937bf50, xpos=460, ypos=421, which=1,
    mod=<value optimized out>, doit=1) at g_editor.c:93
#21 0x0808e6b7 in canvas_mousedown (x=0x937bf50, xpos=460, ypos=421,
which=1,
    mod=0) at g_editor.c:1256
#22 0x080afe21 in pd_typedmess (x=0x937bf50, s=0x9174c78, argc=4,
    argv=0x812a568) at m_class.c:779
#23 0x080af9ab in pd_typedmess (x=0x9329930, s=0x9174c78, argc=4,
    argv=0x812a568) at m_class.c:800
#24 0x080b5963 in binbuf_eval (x=0x918ed88, target=0x9329930, argc=0,
argv=0x0)
    at m_binbuf.c:677
#25 0x080c2150 in socketreceiver_read (x=0x918edf8, fd=10) at s_inter.c:553
#26 0x080c0f37 in sys_domicrosleep (microsec=<value optimized out>,
    pollem=<value optimized out>) at s_inter.c:193
#27 0x080bd660 in m_scheduler () at m_sched.c:489
#28 0x080c0805 in sys_main (argc=3, argv=0xbfbc9734) at s_main.c:318
#29 0x080cc0df in main (argc=Cannot access memory at address 0x7cf2
) at s_entry.c:31
(gdb)

libtiff just saved an unreadable tif in this case.

I'll add my copy idea to the tracker.

.b.

IOhannes m zmoelnig wrote:
> hi
> 
> B. Bogart wrote:
>> Hey all,
>>
>> I've had trouble loading some TIFs generated in pd/Gem in PIL (python
>> imaging). I asked on the list and it seems PIL expects some particular
>> TIF tags being set in order to recognize the image.
> 
> ok, i have fixed this now.
> 
>>
>> I think it can only be an improvement to add these tags so that tifs
>> generated in pd/Gem can be loaded by as many applications as possible.
>>
>> The attachment contains the specific tags.
>>
> 
> nevertheless: Gem tries to default to use imagemagick for
> reading/writing images (on lin and win).
> imagemagick does produce correct files (with all tifftags set).
> the missing tifftags only occured (though this is know fixed) when using
> the fallback libtiff library.
> is there any reason why you are not using imagemagick?
> 
> mfg.ui.,xdf
> IOhannes
> 





More information about the GEM-dev mailing list