Página 1 de 1

Criar imagem JPG/BMP/TIFF de TXT

Enviado: 02 Fev 2010 18:47
por wfr123
Boa tarde, gostaria de saber se tem alguma função ou lib que possa criar uma imagem bm,jpg,tiff,etc.. de um arquivo texto, encontrei algo numa lib freeimage mas não consegui ir para frente.

Aguardo qualquer ajuda.

Re: CRIAR IMAGEM JPG/BMP/TIFF DE TXT

Enviado: 03 Fev 2010 14:30
por rochinha
Amiguinho,

Tempos atrás eu tinha a idéia de guardar imagens em um .DBF para isto sacaria de campos do tipo MEMO para salvar o conteudo de uma imagem.

Primeiro pensei em transformar em TXT e ler byte a byte do arquivo e salvar no campo MEMO.

Uma imagem é um conjunto de bytes e se voce apenas renomear para .TXT poderá obter o conteudo pelo MEMOREAD e vice-versa.

Se a imagem esta em formato texto, tente renomeá-la para .JPG, TIFF, PCX ou GIF e veja o resultado.

Caso voce necessite manipular mais ainda suas imagem sugiro ver uma postagem minha em viewtopic.php?f=2&t=8819&p=49761&hilit=copyimage#p49761

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 03 Fev 2010 19:04
por wfr123
Rochinha, obrigado pelo retorno, entendi sua rotina.
Mas assim o que desejo é gerar uma arquivo tipo jpg/bmp/etc.. de um arquivo que ja tenho de texto.
Ou seja tenho um arquivo de tabela.dbf, deste arquivo vou retirar alguns itens para gerar uma imagem, esta imagem quero pegar e colocar tipo no powerpoint para pode gerar alguns slides e depois gravar em um pendrive e poder colocar em uma televisão e a mesma ficar passando as fotos dos produtos e também os preços de cada um.
Lembrando que isto vai ser gerado em um PC com windows 98, então o ideal seria uma função dentro do proprio harbour que gere esta imagem simples para o powerpoint poder ler junto com as outras fotos.

Agradeço desde já.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 01:08
por gvc
Acho dificil fazer o que vc quer, já que o [x]Harbour não é uma biblioteca gráfica.

Só para constar:
Quando vc grava uma parte da tela, vai para a variável uma sequencia de 2 bytes que corresponde ao caracter e a cor do mesmo e do fundo. Assim se vc copiar uma linha de 10 caracteres, a variável conterá 20 caracteres.

Agora o problema é transformar isso em imagem.
O win32prn pode ser usado para montar a tela em relatório. Vc poderia mandar o relatório para o o pdfcreator. Mas dai é um PDF e não uma imagem como vc quer.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 09:23
por wfr123
Gvc o que precisso no harbour é apenas gerar a imagem de qualquer formato, ou seja do mesmo que tem a libpdf gerando um pdf não teria alguma lib ou função que gere alguma imagem de algum texto de algo na memoria, etc...

Rochinha esta função que voce coloca no outro topico CreateObjetc(xHarbour) tem como ela fazer isto se sim estaria em qual lib tem algum manual dela ?

sem mais.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 11:31
por Itamar M. Lins Jr.
No Win98 aperte PrintScreen
A tela vai para a area de transferencia.
Você pode colar onde desejar.
CTRL+PrintScreen pega a tela com foco.


Saudações,
Itamar M. Lins Jr.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 12:18
por rochinha
Amiguinho,

A TOleAuto():New() é padrão do Harbour que também possui CreateObject().

Portanto troque A TOleAuto():New( "CopyImage.CopyImage.1" ) po CreateObject( "CopyImage.CopyImage.1" ).

E agora, a partir de sua postagem anterior já da pra saber o que voce precisa.

Voce precisa gerar um arquivo .PDF a partir de uma TeXTo? verifique um tópico recente em Como colocar imagens em um PDF?

Voce precisa gerar uma imagem da tela verifique o tópico Colocar programa residente na memória ?

E neste trecho tenho a função GravaProcess() alterada para manipular a captura de tela:

Código: Selecionar todos

//-------------------------------------
Function GravaProcess( cImgFile, oWnd ) 
//-------------------------------------
   local lUsaClipBoard := .f.
   if cImage = "SIM"
      hWnd := FindWindow(nil,'Program Manager')
      if lUsaClipBoard
         WndCopy( hWnd, .f., .t. )
         //
         oClipBoard := TClipBoard():New( 2 ) // 1-text, 2-bitmap
         oClipBoard:Open() 
         hBmp := oClipBoard:GetData()
         oClipBoard:Close() 
      else
         hBmp := WndBitmap( hWnd )
      endif
      fErase(cImgFile)
      hDib := DibFromBitmap( hBmp )
      DibWrite( cImgFile, hDib )
      GlobalFree( hDib ) 
      GlobalFree( hBmp ) 
      //WaitRun( "nconvert -out jpeg -q 100 -D "+cImgFile, 0 )
      //
      ep := cFilePath( GetModuleFileName( GetInstance() ) ) 
      oCopyImage := TOleAuto():New( "CopyImage.CopyImage.1" ) 
      oCopyImage:CopyFile( ep + cImgFile, ep + strtran( cImgFile, "bmp", "jpeg" ), 120, 120) 
      oCopyImage := nil
      //
      dbSelectArea( "service" )
      dbAppend()
      service->usuario := NetName()
      service->data    := Date()
      service->hora    := Time()
      service->imagem  := StrTran( cImgFile, ".bmp", ".jpg" )
      dbNetReglock()
   endif
   //USE service SHARED
   //dbCloseAll()
   if cIMGAlerta = "SIM"
      //Ballon("C A P T U R E I "+acessos->USUARIO,2)
      Ballon("Capturei mais uma imagem",2)
   endif
   dbSelectArea( "acessos" )
   dbGoTop()
   lStatus := acessos->Status
   //if lStatus // Se usuario esta liberado para uso da maquina ela sera ativada
   //   //Ballon("M O S T R A N D O "+acessos->USUARIO,2)
   //   WinExec( "servshow", 7 )
   //   ShowWindow( FindWindow(nil,'Program Manager'), SW_SHOW)
   //   ShowWindow(FindWindow( 'Shell_TrayWnd',nil), SW_SHOWNA)
   //else
   //   //Ballon("E S C O N D E N D O "+acessos->USUARIO,2)
   //   WinExec( "servhide", 7 )
   //   ShowWindow(FindWindow( 'Shell_TrayWnd',nil), SW_HIDE)
   //   ShowWindow( FindWindow(nil,'Program Manager'), SW_HIDE)
   //endif
   //lOk := fiSave( 0, hDib, cImgFile )
   //if !lOk
   //   MsgInfo( "Can't not save file" )
   //endif
   //MsgRun('gravei')
   Return NIL
Veja que capturo o Desktop que foi jogado para o Clipboard por uma classe nativa do Fivewin e pelo fato de só conseguir o conteudo da imagem no formato .BMP fiz uso da CopyImage.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 16:27
por wfr123
Na verdade o problema esta justamente ai, eu precisso gerar a imagem, não mandar para o windows e depois capturar.

Eu gerei um relatorio em um arquivo txt e gostaria de pegar este arquivo e gerar uma imagem em bmp/jpg/etc.. podendo salvar em qualquer lugar. tipo assim:

arquivo relatorio.txt:

CONTRAFILE 25,00
FILE 30,00
PICANHA 30,00
COSTELA 15,00

então o programa ficaria +- assim :

imagem=: geraimagem("relatorio.txt","JPG")
save(imagem,"c:\imagens\")

agradeço a atenção.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 17:58
por rochinha
Amiguinho,

Agora me dei por mim, encontrei dois tópicos seus em sessões diferentes relacionadas ao mesmo assunto e lhe foram apresentadas muitas soluções.

No entanto, nenhuma lhe serve. Lógico que por muitas vezes tentamos adivinhar uma resposta baseado em fatos ocorridos com cada uma e que muitas vezes se encaixam.

Mas adivinhar que o que voce precisava era tão simples que acabei por encontrar no Google, somente a partir de seu ultimo post, foi barbada, mas acabamos por não fornecer a solução diretamente daqui.

Voce precisará agora manipular o código abaixo para obter algo próximo ao que precisa.

Geralmente postamos nossas idéias esperando soluções e nenhuma precisaria ser tão especifica a ponto de parecer não ter muito a ver com o contexto, mas geralmente obtemos resultados que nos dão uma solução próxima.

Ter tanto trabalho para gerar uma imagem de texto, se voce não vai usá-la para enviar um FAX e simplesmente apresentá-la num televisor ou telão tem significado muito simples fugindo da complexidade de se gerar um arquivo a partir de outro muito distinto.

Usar este tipo de recurso tão sofisticado só seria bem visto em um sistema de digitalização de documentos, mas geralmente só se usa este recurso na digitalização de documentos reais, ja que o que encontramos em um computador, já é algo digital e etéreo.

Em todo caso a idéia é válida e cabe a voce implementá-la agora:

Código: Selecionar todos

*   SCCS Id: @(#)txt2bmp.c   3.3     95/01/26                     */
/*   Copyright (c) NetHack PC Development Team 1993, 1994, 1995     */
/*   NetHack may be freely redistributed.  See license for details. */

/*
 * This creates a txt2bmp.exe
 *
 * txt2bmp.exe -i generates 'index'
 * txt2bmp.exe -h generates 'allegfx.h' THIS FILE IS OBSOLETE
 * txt2bmp.exe -fXX generates all the *.bmp
 * txt2bmp.exe -bXX generates slamXX.bmp
 * txt2bmp.exe -c txtname bmpname converts txtname to a single bmpname
 * txt2bmp.exe -p bmpname changes the bitmap to a 256 color bmp with 
 *		  the pink as the first color
 *
 * Edit History:
 *
 *      Initial Creation                        K.Youngblood    ??/??/??
 *      added 32x32 text tile support		W.Cheung	00/06/19
 *	added direct write to files		W.Cheung	00/06/21
 *
 */

#include <allegro.h>

#include "hack.h"
#include "pcvideo.h"
#include "tile.h"
#include "pctiles.h"

#include <ctype.h>
#include <dos.h>
#ifndef MONITOR_HEAP
#include <stdlib.h>
#endif
#include <time.h>

extern char *FDECL(tilename, (int, int));

#define Fprintf (void) fprintf
#define Fclose  (void) fclose

static int num_colors;
static pixel pixels[MAX_TILE_Y][MAX_TILE_X];
static BITMAP *bigtile_bmp;

static struct tibhdr_struct tibheader;

/* [WAC] Use the 32x32x262 color tiles */

static const char 
    *tilefiles3d[] = {  "../win/share/mon3d.txt",
                        "../win/share/obj3d.txt",
                        "../win/share/oth3d.txt"},
    *tilefiles32[] = {  "../win/share/mon32.txt",
                        "../win/share/obj32.txt",
                        "../win/share/oth32.txt"},
    *tilefiles16[] = {  "../win/share/monsters.txt",
                        "../win/share/objects.txt",
                        "../win/share/other.txt"};

static const char
    *Dont_Edit_Code =
	"/* This source file is generated by 'txt2bmp'.  Do not edit. */\n",
    *Dont_Edit_Index =
	"# This index file was generated by 'txt2bmp'.\n";

static int tilecount;
static int filenum;
static int paletteflag;

#define TRANS_COLOR MASK_COLOR_24

static const char
    *bigtile_file3d = "../src/slam3D.bmp",
    *bigtile_file32 = "../src/slam32.bmp",
    *bigtile_file16 = "../src/slam16.bmp",
    *index_file = "../src/index",
    *allegfx_file = "../include/allegfx.h";

/* #define FINAL_COLORDEPTH_8_BPP */

/* Currently interpolation is OFF */
/* Should handle all sizes tile files now */
void
make_bitmap(pixels, tilecount, trans, filename, make_big)
pixel (*pixels)[MAX_TILE_X];
int tilecount;
int trans;
char *filename;
boolean make_big;
{
        int i, j, x, y;
        long color, color2;
        char cmd[60];
        BITMAP *tilebmp;

        tilebmp = create_bitmap(tile_x, tile_y);

        color2 = 0L;
        color2 |= 71;
        color2 |= (108) << 8;
        color2 |= (108) << 16;

        /* load the origional tile */

        for (j = 0; j < tile_y; j++) {
                for (i = 0; i < tile_x; i++) 
                {
                        color = 0L;
                        color |= (pixels[j][i].r & 0x0000ff);
                        color |= (pixels[j][i].g & 0x0000ff) << 8;
                        color |= (pixels[j][i].b & 0x0000ff) << 16;
                        putpixel(tilebmp, i, j, color);
                }
        }

#if 0
        drawing_mode(DRAW_MODE_TRANS, tilebmp, 0, 0);
        set_trans_blender(255, 255, 255, 127);

        for(y = 0; y < tile_y; y++)
                for(x = 1; x < tile_x; x += 2)
                {
                        color=getpixel(tilebmp, min(x+1,tile_x - 2),y);
                        putpixel(tilebmp, x, y, color);
                }
        /* interpolate horizontal lines */

        for(x = 0; x < tile_x; x++)
                for(y = 1; y < tile_y; y += 2)
                {
                        color = getpixel(tilebmp, x, min(y+1,tile_y - 2));
                        putpixel(tilebmp, x, y, color);
                }
#endif

        drawing_mode(DRAW_MODE_SOLID, tilebmp, 0, 0);

        if(trans)
        {
		/* WAC probably slower, but more accurate */
		for (x = 0; x < tile_x; x++)
		    for (y = 0; y < tile_y; y++)
	                if(getpixel(tilebmp, x, y) == color2)
        	                putpixel(tilebmp,x,y, TRANS_COLOR);
#if 0
                if(getpixel(tilebmp, 0, 0) == color2)
                        floodfill(tilebmp,0,0, TRANS_COLOR);
                if(getpixel(tilebmp, 0, 31) == color2)
                        floodfill(tilebmp,0,31, TRANS_COLOR);
                if(getpixel(tilebmp, 31, 0) == color2)
                        floodfill(tilebmp,31,0, TRANS_COLOR);
                if(getpixel(tilebmp, 31, 31) == color2)
                        floodfill(tilebmp,31,31, TRANS_COLOR);
#endif
        }

	if (!make_big) {
            save_bitmap(filename, tilebmp, 0);
	} else {
	    int col = (int)(tilecount % TILES_PER_ROW);
	    int row = (int)(tilecount / TILES_PER_ROW);
#ifdef DEBUG
	    Fprintf(stderr, "col: %i row: %i\n", col, row);
#endif
	    blit(tilebmp, bigtile_bmp, 0, 0, col * tile_x, row * tile_y, tile_x, tile_y);
	}
        destroy_bitmap(tilebmp);
}

int
main(argc, argv)
int argc;
char *argv[];
{
        int i;
        struct tm *newtime;
        time_t aclock;
        char *paletteptr;
        char cmd2[60];
        char filename[60];
        char util_mode;
        FILE *ofp; /* Output for -i, -h */
        const char **tilefiles;
        char bigtile_file[BUFSZ];
        boolean trans_background = FALSE;

	/* All operations assume 24 bit internal files */
        set_color_depth(24);

        if (argc < 2) {
	    	Fprintf(stderr, "Bad arg count (%d).\n", argc-1);
	    	(void) fflush(stderr);
                exit(EXIT_FAILURE);
        }
        
        util_mode = argv[1][1];
        
        if (util_mode == 'I') util_mode = 'i';
        if (util_mode == 'H') util_mode = 'h';
        if (util_mode == 'F') util_mode = 'f';
        if (util_mode == 'B') util_mode = 'b';
        if (util_mode == 'C') util_mode = 'c';
        
        if (util_mode != 'i' && util_mode != 'h' && util_mode != 'f' 
			     && util_mode != 'b' && util_mode != 'c'
			     && util_mode != 'p') {
	    	Fprintf(stderr, "Unknown option '-%c'.\n Use -i, -h, -f, -b, -c or -p.\n", 
	    					util_mode);
	    	(void) fflush(stderr);
                exit(EXIT_FAILURE);        	
        }

        if (util_mode == 'p') {
            if (argc != 3) {
	    	Fprintf(stderr, "Bad arg count (%d).\n", argc-1);
	    	(void) fflush(stderr);
                exit(EXIT_FAILURE);
            } else {
#ifdef FINAL_COLORDEPTH_8_BPP
            	PALETTE tmp_pal;
            	BITMAP* tmp_bmp;
        	char rsvd[256];
        	int i;
            	
        	Strcpy(bigtile_file, argv[2]);
            	bigtile_bmp = load_bitmap(bigtile_file,tmp_pal);
            	
            	if (!bigtile_bmp) {
	    		Fprintf(stderr, "Unable to load %s.\n", argv[2]);
	    		(void) fflush(stderr);
                	exit(EXIT_FAILURE);
            	}

		tmp_pal[0].r = tmp_pal[0].b = 63; 
		tmp_pal[0].g = 0;
		
		rsvd[0] = 1;
		for (i = 1; i < 256; i++) rsvd[i] = 0;

        	generate_optimized_palette(bigtile_bmp, tmp_pal, rsvd);
        	select_palette(tmp_pal);
        	
        	tmp_bmp = create_bitmap_ex(8, bigtile_bmp->w, bigtile_bmp->h);

		blit(bigtile_bmp, tmp_bmp,  0, 0, 0, 0,bigtile_bmp->w, bigtile_bmp->h);
		
        	save_bitmap(bigtile_file, tmp_bmp, tmp_pal);
        	
        	destroy_bitmap(bigtile_bmp);
        	destroy_bitmap(tmp_bmp);

#endif
	        exit(EXIT_SUCCESS);
            }
        }

        if ((util_mode == 'c' && argc != 4) || (util_mode != 'c' && argc != 2)) {
	    	Fprintf(stderr, "Bad arg count (%d).\n", argc-1);
	    	(void) fflush(stderr);
                exit(EXIT_FAILURE);
        }
        
        if (util_mode != 'c') {
	    if (argv[1][2] == '1' && argv[1][3] == '6') {
    		Fprintf(stderr, "Using 16x16 text tile files\n");
    		(void) fflush(stderr);
		tilefiles = tilefiles16;
		Strcpy(bigtile_file, bigtile_file16);
	    } else if (argv[1][2] == '3' && 
		    	(argv[1][3] == 'D' || argv[1][3] == 'd')) {
    		Fprintf(stderr, "Using 48x64 text tile files\n");
    		(void) fflush(stderr);
		tilefiles = tilefiles3d;
		Strcpy(bigtile_file, bigtile_file3d);
		trans_background = TRUE;
	    } else {
	       	/* Default mode is 32 */
    		Fprintf(stderr, "Using 32x32 text tile files\n");
    		(void) fflush(stderr);
		tilefiles = tilefiles32;
		Strcpy(bigtile_file, bigtile_file32);
	    }
        } else {
        	Strcpy(bigtile_file, argv[3]);
        }

        time(&aclock);
        newtime = localtime(&aclock);

        tilecount = 0;
        paletteflag = 0;        
        filenum = 0;
        
        /* Open file (if needed) */
        if (util_mode == 'i') {
	    if (!(ofp = fopen(index_file, WRTMODE))) {
		perror(index_file);
		exit(EXIT_FAILURE);
	    }
	    Fprintf(ofp,Dont_Edit_Index);   
        } else if (util_mode == 'h') {
	    if (!(ofp = fopen(allegfx_file, WRTMODE))) {
		perror(allegfx_file);
		exit(EXIT_FAILURE);
	    }
    	    Fprintf(ofp,"/*\tSCCS Id: @(#)allegfx.h\t3.2\t96/05/17 */\n\n");
	    Fprintf(ofp,Dont_Edit_Code);	    
	    Fprintf(ofp,"/*\tNOTE: This file is completely obselete! */\n"
		"/*\tI have no idea why you made it */\n\n");
        } else if (util_mode == 'b' || util_mode == 'c') {
            bigtile_bmp = NULL;
        }
        
        while (filenum < 3) {        	
                int index = 0;
                boolean trans_mode = ((filenum < 2) || trans_background);

		if (util_mode != 'c') {
                    if (!fopen_text_file(tilefiles[filenum], RDTMODE)) {
                        Fprintf(stderr,
                         "Cannot find file '%s'.\n", tilefiles[filenum]);
                        exit(EXIT_FAILURE);
                    }
		} else if (!fopen_text_file(argv[2], RDTMODE)) {
                        Fprintf(stderr,
                         "Cannot find file '%s'.\n", tilefiles[filenum]);
                        exit(EXIT_FAILURE);
		}
                    
                num_colors = colorsinmap;
                if (num_colors > MAXCOLORMAPSIZE) {
                        Fprintf(stderr, "too many colors (%d)\n", num_colors);
                        exit(EXIT_FAILURE);
                }
                if (!paletteflag) {
                        paletteptr = tibheader.palette;
                        for (i = 0; i < num_colors; i++) {
                                *paletteptr++ = ColorMap[CM_RED][i],
                                *paletteptr++ = ColorMap[CM_GREEN][i],
                                *paletteptr++ = ColorMap[CM_BLUE][i];
                        }
                        paletteflag++;
                }

	    	if ((util_mode == 'b' || util_mode == 'c') && !bigtile_bmp) {
	    	    /* Only make this once */
	            bigtile_bmp = create_bitmap(tile_x * TILES_PER_ROW, tile_y * TILES_PER_COL);
	    	}

                while (read_text_tile(pixels)) {
                        sprintf(filename, "%c%03d%s", 
                                (!filenum) ? 'm' : (filenum == 1) ? 'o' : 'e',
                                index, ".bmp");
			if (util_mode == 'i') {
                            Fprintf(ofp, "%04d (%s) : %s\n", 
                                tilecount, tilename(filenum+1,index), 
                                filename);
			} else if (util_mode == 'f') {
                                make_bitmap(pixels, tilecount, trans_mode
                                            ,filename, FALSE);
			} else if (util_mode == 'b' || util_mode == 'c') {
                                make_bitmap(pixels, tilecount, trans_mode
                                            ,filename, TRUE);
			}

                        tilecount++;     
                        index++;
                }
                
                if (util_mode == 'h') 
                    switch(filenum)
                    {
		            case 0:
		                Fprintf(ofp, "#define NUMBER_OF_MONS %d\n", 
		                        tilecount);
		                break;
		            case 1:
		                Fprintf(ofp, "#define NUMBER_OF_OBJS %d\n", 
		                        tilecount);
		                break;
		            case 2:
		                Fprintf(ofp, "#define NUMBER_OF_TILES %d\n", 
		                        tilecount);
		                break;
                    }

		if (util_mode == 'f')
		    Fprintf(stderr, "%d tiles processed from %s\n", 
					index, tilefiles[filenum]);

                (void) fclose_text_file();
                ++filenum;
                
                /* Only process 1 file */
                if (util_mode == 'c') break;
        }

	/* Close file */
        if ((util_mode == 'i') || (util_mode == 'h'))
        	Fclose(ofp);
        else if (util_mode == 'f')
		Fprintf(stderr, "Total of %d bmp tiles written.\n", tilecount);
        else if (util_mode == 'b' || util_mode == 'c') {
        	PALETTE tmp_pal;
#ifdef FINAL_COLORDEPTH_8_BPP
        	BITMAP *tmp_bmp;
        	char rsvd[256];
        	int i;

		tmp_pal[0].r = tmp_pal[0].b = 63; 
		tmp_pal[0].g = 0;
		
		rsvd[0] = 1;
		for (i = 1; i < 256; i++) rsvd[i] = 0;

        	generate_optimized_palette(bigtile_bmp, tmp_pal, rsvd);
        	select_palette(tmp_pal);
        	
        	tmp_bmp = create_bitmap_ex(8, TILES_PER_ROW * tile_x, 
       				(int)(tile_y * (1 + (tilecount / TILES_PER_ROW))));

		blit(bigtile_bmp, tmp_bmp,  0, 0, 0, 0,bigtile_bmp->w, bigtile_bmp->h);
		
        	save_bitmap(bigtile_file, tmp_bmp, tmp_pal);
        	
        	destroy_bitmap(bigtile_bmp);
        	destroy_bitmap(tmp_bmp);
        	
#else
        	save_bitmap(bigtile_file, bigtile_bmp, tmp_pal);
        	
        	destroy_bitmap(bigtile_bmp);

#endif
        }

        exit(EXIT_SUCCESS);
        /*NOTREACHED*/
        return 0;
}
Os componentes e acessórios para completar esta código estão em http://www.koders.com/c/fid29C04735FE66 ... spx?s=time

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 04 Fev 2010 21:00
por sygecom
A GD da CONTRIB do xHarbour faz isso que você quer.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 05 Fev 2010 16:41
por wfr123
Rochinha, obrigado, pela rotina, quanto a mensagem do outro topico, foi um acidente é que fui ver, e achei que esta neste quando deixei a mensagem.

Sobre a rotina, encontrei ela ja compilada mas ela nao gera o arquivo, alias gera apenas um fundo sempre verde.

Sygecom, até já tinha tentando fazer pela GD mas eu só tenho os fontes da contrib, não consegui compilar as lib da contrib, pode me ajudar nesta compilação ou me mandar ja compliada, para o xhabour 1.0.

Obs: Inclusive no link http://www.php.net/manual/pt_BR/ref.image.php tem as descrições da funções da GD para PHP, onde é bastante similar a GD da contrib.

Até encontrei o programa atachado que acho que serviria para mim, mas não consegui compilar, se alguem puder dar uma olhada.

Re: Criar imagem JPG/BMP/TIFF de TXT

Enviado: 05 Fev 2010 18:11
por sygecom
Exemplo de uso da GD:
http://www.4shared.com/file/68584240/2c ... co_gd.html

xHarbour 1.0.0 + Contrib compilada:
http://www.4shared.com/file/107904611/c ... bcc55.html