[petsc-users] [Fwd: Re: saving views as images]
Barry Smith
bsmith at mcs.anl.gov
Wed Mar 11 13:47:22 CDT 2015
Thanks for the suggestions and observations. I have made a new branch barry/improve-afterimage
that allows one to set the file format saved by passing it in the filename. On my Mac with the --download-afterimage only .Gif and .Jpeg formats are supported (by Afterimage) but that will depend on your install of Afterimage I guess (Png gives me the same error message you get).
Barry
> On Mar 10, 2015, at 1:58 PM, Theler German Guillermo <gtheler at cites-gss.com> wrote:
>
>
> On Tue, 2015-03-10 at 13:02 -0500, Barry Smith wrote:
>> Looks like your afterimage is not installed to support .Gif files. When I install afterimage on my Mac from source http://www.afterstep.org/afterimage/getcode.php it just comes with support for .Gif files. Suggest trying that.
>
> Yes, I realized that. Perhaps there is something about the GIF license
> that the Debian team had to remove GIF support. I have tried to search
> in the changelogs but could not find any reference. BTW, as I wrote in
> my earlier emails, Debian provides version AfterImage 2.2.12 whilst in
> the URL you quote (which is the only one that Google returns) the latest
> version is 1.20, which I cannot have PETSc to use (see the configure.log
> transcript below).
>
> My workwaround was to change the format in which PETSc asks AfterImage
> to dump the draw, i.e. line 395
> of /home/gtheler/libs/petsc-3.5.3/src/sys/classes/draw/impls/x/xinit.c:
>
> ASImage2file(asimage, 0, filename,ASIT_Gif,0);
>
> So far I tried ASIT_Png but the library complains about not being able
> to initialize zlib, but I think I should be able to fix. ASIT_Bmp works
> fine.
>
> Is there anything special about GIF within PETSc? IIRC, there are indeed
> some issues with the license and this format was virtually replaced with
> PNG almost all over the place. Maybe it would be a good idea to add a
> database key so as to select the format in PetscDrawSetSave().
>
>
> According to AfterImage API documentation, valid file types are
>
> typedef enum
> {
> ASIT_Xpm = 0,
> ASIT_ZCompressedXpm,
> ASIT_GZCompressedXpm,
> ASIT_Png,
> ASIT_Jpeg,
> ASIT_Xcf,
> ASIT_Ppm,
> ASIT_Pnm,
> ASIT_Bmp,
> ASIT_Ico,
> ASIT_Cur,
> ASIT_Gif,
> ASIT_Tiff,
> ASIT_XMLScript,
> ASIT_SVG,
> /* reserved for future implementation : */
> ASIT_Xbm,
> ASIT_Targa,
> ASIT_Supported = ASIT_Targa,
> ASIT_Pcx,
> ASIT_HTML,
> ASIT_XML,
> ASIT_Unknown
> }ASImageFileTypes;
>
>
> Output of configure.log with libAfterImage 1.20 as downloaded from
> http://www.afterstep.org/afterimage/getcode.php:
>
>
> Source:
> #include "confdefs.h"
> #include "conffix.h"
> /* Override any gcc2 internal prototype to avoid an error. */
> char picture_ximage2asimage();
> static void _check_picture_ximage2asimage()
> { picture_ximage2asimage(); }
>
> int main() {
> _check_picture_ximage2asimage();;
> return 0;
> }
> Pushing language C
> Popping language C
> Executing: mpicc -o /tmp/petsc-s8uvAW/config.libraries/conftest
> -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas
> -g3 -O0 /tmp/petsc-s8uvAW/config.libraries/conftest.o
> -Wl,-rpath,/home/gtheler/libs/libAfterImage-1.20
> -L/home/gtheler/libs/libAfterImage-1.20 -lAfterImage -lX11
> -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu
> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/4.9
> -L/usr/lib/gcc/x86_64-linux-gnu/4.9 -Wl,-rpath,/usr/lib/x86_64-linux-gnu
> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu
> -L/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu
> -L/usr/lib/x86_64-linux-gnu -ldl -lmpich -lopa -lmpl -lrt -lcr -lpthread
> -lgcc_s -ldl
> Possible ERROR while running linker: exit code 256
> stderr:
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(ximage.o): In
> function `asimage2drawable_gl':
> ximage.c:(.text+0x1178): undefined reference to `show_warning'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(ximage.o): In
> function `asimage2drawable':
> ximage.c:(.text+0x1292): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(ximage.o): In
> function `asimage2alpha_drawable':
> ximage.c:(.text+0x13ac): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(ximage.o): In
> function `asimage2alpha':
> ximage.c:(.text+0x157c): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `asimage_start':
> asimage.c:(.text+0x1bb): undefined reference to `safecalloc'
> asimage.c:(.text+0x22e): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `create_asimage':
> asimage.c:(.text+0x38d): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `destroy_asimage':
> asimage.c:(.text+0x865): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `create_image_manager':
> asimage.c:(.text+0x9bf): undefined reference to `mystrdup'
> asimage.c:(.text+0x9f9): undefined reference to `string_compare'
> asimage.c:(.text+0xa00): undefined reference to `string_hash_value'
> asimage.c:(.text+0xa1e): undefined reference to `create_ashash'
> asimage.c:(.text+0xa43): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `destroy_image_manager':
> asimage.c:(.text+0xa74): undefined reference to `destroy_ashash'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `store_asimage':
> asimage.c:(.text+0xb19): undefined reference to `mystrdup'
> asimage.c:(.text+0xb43): undefined reference to `add_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `query_asimage':
> asimage.c:(.text+0xbad): undefined reference to `get_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `fetch_asimage':
> asimage.c:(.text+0xc0d): undefined reference to `get_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `dup_asimage':
> asimage.c:(.text+0xc71): undefined reference to `show_error'
> asimage.c:(.text+0xca4): undefined reference to `show_debug'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `release_asimage':
> asimage.c:(.text+0xd0b): undefined reference to `remove_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `forget_asimage':
> asimage.c:(.text+0xd77): undefined reference to `remove_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `relocate_asimage':
> asimage.c:(.text+0xdb9): undefined reference to `remove_hash_item'
> asimage.c:(.text+0xde3): undefined reference to `add_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `safe_asimage_destroy':
> asimage.c:(.text+0xe9a): undefined reference to `remove_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `release_asimage_by_name':
> asimage.c:(.text+0xedd): undefined reference to `get_hash_item'
> asimage.c:(.text+0xf36): undefined reference to `remove_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `flip_gradient':
> asimage.c:(.text+0x1006): undefined reference to `safecalloc'
> asimage.c:(.text+0x1031): undefined reference to `safemalloc'
> asimage.c:(.text+0x103d): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `create_image_layers':
> asimage.c:(.text+0x1226): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `destroy_image_layers':
> asimage.c:(.text+0x12e7): undefined reference to `remove_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `asimage_compare_line':
> asimage.c:(.text+0x1a9e): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `set_asimage_vector':
> asimage.c:(.text+0x1dac): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `vectorize_asimage':
> asimage.c:(.text+0x1f6a): undefined reference to `safecalloc'
> asimage.c:(.text+0x1f80): undefined reference to `safemalloc'
> asimage.c:(.text+0x1f90): undefined reference to `safemalloc'
> asimage.c:(.text+0x1fa0): undefined reference to `safemalloc'
> asimage.c:(.text+0x1fb0): undefined reference to `safemalloc'
> asimage.c:(.text+0x1fc0): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o):asimage.c:(.text+0x2143): more undefined references to `safemalloc' follow
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asimage.o): In
> function `forget_asimage_name':
> asimage.c:(.text+0xe22): undefined reference to `remove_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(ascmap.o): In
> function `color_hash2colormap':
> ascmap.c:(.text+0x564): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(ascmap.o): In
> function `colormap_asimage':
> ascmap.c:(.text+0x858): undefined reference to `safemalloc'
> ascmap.c:(.text+0x88b): undefined reference to `safecalloc'
> ascmap.c:(.text+0x89f): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `store_data_in_block':
> asstorage.c:(.text+0x530f): undefined reference to `show_error'
> asstorage.c:(.text+0x532d): undefined reference to `show_error'
> asstorage.c:(.text+0x5359): undefined reference to `show_error'
> asstorage.c:(.text+0x5380): undefined reference to `show_error'
> asstorage.c:(.text+0x53a9): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o):asstorage.c:(.text+0x57cd): more undefined references to `show_error' follow
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `store_data_in_block':
> asstorage.c:(.text+0x5afd): undefined reference to `show_warning'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `store_compressed_data':
> asstorage.c:(.text+0x5dcf): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `query_storage_slot':
> asstorage.c:(.text+0x8172): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `print_storage_slot':
> asstorage.c:(.text+0x82f4): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `forget_data':
> asstorage.c:(.text+0x8642): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `dup_data':
> asstorage.c:(.text+0x87cc): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o):asstorage.c:(.text+0x89f5): more undefined references to `show_error' follow
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asstorage.o): In
> function `dup_data':
> asstorage.c:(.text+0x8b4c): undefined reference to `show_warning'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `ximage2scanline_pseudo12bpp':
> asvisual.c:(.text+0x2305): undefined reference to `get_hash_item'
> asvisual.c:(.text+0x2402): undefined reference to `get_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `query_screen_visual_id':
> asvisual.c:(.text+0x26f3): undefined reference to `get_output_threshold'
> asvisual.c:(.text+0x27ca): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `destroy_asvisual':
> asvisual.c:(.text+0x28a8): undefined reference to `destroy_ashash'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `visual2visual_prop':
> asvisual.c:(.text+0x293b): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `visual_prop2visual':
> asvisual.c:(.text+0x2be5): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `make_reverse_colormap':
> asvisual.c:(.text+0x2fc6): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `make_reverse_colorhash':
> asvisual.c:(.text+0x3062): undefined reference to `create_ashash'
> asvisual.c:(.text+0x30c7): undefined reference to `add_hash_item'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `setup_as_colormap':
> asvisual.c:(.text+0x338e): undefined reference to `safemalloc'
> asvisual.c:(.text+0x34ca): undefined reference to `safemalloc'
> asvisual.c:(.text+0x3642): undefined reference to `safemalloc'
> asvisual.c:(.text+0x37ef): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `create_asvisual_for_id':
> asvisual.c:(.text+0x3e81): undefined reference to `safecalloc'
> asvisual.c:(.text+0x3f0c): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `create_visual_window':
> asvisual.c:(.text+0x4118): undefined reference to `show_warning'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(asvisual.o): In
> function `create_visual_ximage':
> asvisual.c:(.text+0x4654): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(blender.o): In
> function `blend_scanlines_name2func':
> blender.c:(.text+0x1821): undefined reference to `mystrncasecmp'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(imencdec.o): In
> function `create_image_xim':
> imencdec.c:(.text+0xe71): undefined reference to `show_error'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(imencdec.o): In
> function `create_image_argb32':
> imencdec.c:(.text+0x1e20): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(imencdec.o): In
> function `start_image_decoding':
> imencdec.c:(.text+0x9218): undefined reference to `safecalloc'
> imencdec.c:(.text+0x9529): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(imencdec.o): In
> function `start_image_output':
> imencdec.c:(.text+0x97e2): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(scanline.o): In
> function `prepare_scanline':
> scanline.c:(.text+0x179): undefined reference to `safecalloc'
> scanline.c:(.text+0x25b): undefined reference to `safecalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(scanline.o):scanline.c:(.text+0x3a8): more undefined references to `safecalloc' follow
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(scanline.o): In
> function `calculate_green_diff':
> scanline.c:(.text+0x16b1): undefined reference to `safemalloc'
> /home/gtheler/libs/libAfterImage-1.20/libAfterImage.a(scanline.o): In
> function `interpolate_green_diff':
> scanline.c:(.text+0x19a3): undefined reference to `safemalloc'
> collect2: error: ld returned 1 exit status
> Popping language C
>
>
> ________________________________
> Imprima este mensaje sólo si es absolutamente necesario.
> Para imprimir, en lo posible utilice el papel de ambos lados.
> El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.
>
>
>
> ************AVISO DE CONFIDENCIALIDAD************
>
> El Grupo Sancor Seguros comunica que:
>
> Este mensaje y todos los archivos adjuntos a el son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por ley. Si usted recibió este mensaje erróneamente, por favor notifíquenos respondiendo al remitente, borre el mensaje original y destruya las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo. Todas las opiniones contenidas en este mail son propias del autor del mensaje. La publicación, uso, copia o impresión total o parcial de este mensaje o documentos adjuntos queda prohibida.
>
> Disposición DNDP 10-2008. El titular de los datos personales tiene la facultad de ejercer el derecho de acceso a los mismos en forma gratuita a intervalos no inferiores a seis meses, salvo que acredite un interés legítimo al efecto conforme lo establecido en el artículo 14, inciso 3 de la Ley 25.326. La DIRECCIÓN NACIONAL DE PROTECCIÓN DE DATOS PERSONALES, Organo de Control de la Ley 25.326, tiene la atribución de atender las denuncias y reclamos que se interpongan con relación al incumplimiento de las normas sobre la protección de datos personales.
More information about the petsc-users
mailing list