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.

  Barry

> On Mar 10, 2015, at 12:14 PM, Theler German Guillermo <[email protected]> 
> wrote:
> 
> 
> On Tue, 2015-03-10 at 11:35 -0500, Barry Smith wrote:
>>   You must call
>> 
>>  call(PetscDrawSetSave(draw, "matrix", PETSC_FALSE));
>>  call(PetscDrawSetSaveFinalImage(draw, "matrix2"));
>> 
>> BEFORE you view the image.  PetscDrawSetSave() sets the flag to save future 
>> images; generally you could this immediately after you've done the 
>> PetscViewerDrawOpen
> 
> Got it Barry, so now I have:
> 
>  call(PetscViewerBinaryOpen(PETSC_COMM_WORLD,file,FILE_MODE_READ,&fd));
>  call(MatCreate(PETSC_COMM_WORLD,&A));
>  call(MatSetFromOptions(A));
>  call(MatLoad(A,fd));
> 
>  call(PetscViewerDrawOpen(PETSC_COMM_WORLD, PETSC_NULL, file, 100, 100,
> size, size, &viewer));
>  call(PetscViewerDrawGetDraw(viewer, 0, &draw));
>  call(PetscDrawSetFromOptions(draw));
>  call(PetscDrawSetSave(draw, "matrix", PETSC_FALSE));
>  call(PetscDrawSetSaveFinalImage(draw, "matrix2"));
>  call(MatView(A, viewer));
> 
>  call(PetscDrawDestroy(&draw));
>  call(PetscViewerDestroy(&fd));
>  call(MatDestroy(&A));
>  call(PetscFinalize());
> 
> But now I get this dissapointing message from libafterimage:
> 
> gtheler@blinky:~/codigos/mat2img$ ./mat2img -info
> [0] PetscInitialize(): PETSc successfully started: number of processors
> = 1
> [0] PetscGetHostName(): Rejecting domainname, likely is NIS
> blinky.(none)
> [0] PetscInitialize(): Running on machine: blinky
> [0] PetscCommDuplicate(): Duplicating a communicator 1140850688
> -2080374784 max tags = 536870911
> [0] PetscGetFileStat(): System call stat() succeeded on file matrix.bin
> [0] PetscTestOwnership(): System call access() succeeded on file
> matrix.bin
> [0] PetscFileRetrieve(): Found file matrix.bin
> [0] PetscGetFileStat(): System call stat() failed on file
> matrix.bin.info
> [0] PetscFileRetrieve(): Did not find file matrix.bin.info
> [0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688
> -2080374784
> [0] MatAssemblyEnd_SeqAIJ(): Matrix size: 20 X 20; storage space: 0
> unneeded,58 used
> [0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is
> 0
> [0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 3
> [0] MatCheckCompressedRow(): Found the ratio (num_zerorows
> 0)/(num_localrows 20) < 0.6. Do not use CompressedRow routines.
> [0] Mat_CheckInode(): Found 20 nodes out of 20 rows. Not using Inode
> routines
> [0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688
> -2080374784
> [0] PetscDrawSetUpColormap_Shared(): Successfully allocated colors
> [0] PetscGetHostName(): Rejecting domainname, likely is NIS
> blinky.(none)
> [0] PetscPOpen(): Running command :rm -fr matrix matrix.m4v
> [0] PetscGetHostName(): Rejecting domainname, likely is NIS
> blinky.(none)
> [0] PetscPOpen(): Running command :mkdir matrix
> [0] PetscGetHostName(): Rejecting domainname, likely is NIS
> blinky.(none)
> [0] PetscPOpen(): Running command :rm -fr matrix2 matrix2.m4v
> [0] PetscGetHostName(): Rejecting domainname, likely is NIS
> blinky.(none)
> [0] PetscPOpen(): Running command :mkdir matrix2
> unknown ERROR: unable to write file "matrix2/matrix2_0.Gif" - GIF image
> format is not supported.
> 
> [0] PetscFinalize(): PetscFinalize() called
> gtheler@blinky:~/codigos/mat2img$
> 
> 
> ________________________________
> 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.

Reply via email to