elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


  Mostrar Temas
Páginas: 1 2 [3]
21  Programación / Programación C/C++ / Alguien sabe usar la clase Cximage?? en: 24 Julio 2007, 23:28 pm
Alguien sabe usar Cximage para convertir bmp a jpg? tengo el codigo pero no me reconoce la clase, por lo cual no anda y nose por q.

Código:
#include <windows.h>
#include "ximage.h"
#include "stdafx.h"
#pragma comment(lib,"CxImage.lib")
#pragma comment(lib,"jpeg.lib")


int main()
{
CxImage image;

// bmp -> jpg
image.Load("d:\\image.bmp", CXIMAGE_FORMAT_BMP);
if (image.IsValid())
{
if(!image.IsGrayScale()) image.IncreaseBpp(24);
image.SetJpegQuality(70);
image.Save("d:\\image.jpg",CXIMAGE_FORMAT_JPG);
}

// jpg -> bmp

    image.Load("d:\\image.jpg", CXIMAGE_FORMAT_JPG);
if (image.IsValid())
{
if(!image.IsGrayScale()) image.IncreaseBpp(24);
image.Save("d:\\image2.bmp",CXIMAGE_FORMAT_BMP);
}


}
// redimensionner + bmp -> jpg

    image.Load("d:\\image.bmp", CXIMAGE_FORMAT_BMP);
if (image.IsValid())
{
image.Resample(1024/2,768/2,1,0);
image.Save("d:\\imagesize.jpg",CXIMAGE_FORMAT_JPG);
}

return 1;
}



Errores:
Citar
--------------------Configuration: convertir - Win32 Debug--------------------
Compiling...
convertir.cpp
D:\visual\convertir\convertir.cpp(12) : error C2065: 'CxImage' : undeclared identifier
D:\visual\convertir\convertir.cpp(12) : error C2146: syntax error : missing ';' before identifier 'image'
D:\visual\convertir\convertir.cpp(12) : error C2065: 'image' : undeclared identifier
D:\visual\convertir\convertir.cpp(15) : error C2228: left of '.Load' must have class/struct/union type
D:\visual\convertir\convertir.cpp(15) : error C2065: 'CXIMAGE_FORMAT_BMP' : undeclared identifier
D:\visual\convertir\convertir.cpp(16) : error C2228: left of '.IsValid' must have class/struct/union type
D:\visual\convertir\convertir.cpp(18) : error C2228: left of '.IsGrayScale' must have class/struct/union type
D:\visual\convertir\convertir.cpp(18) : error C2228: left of '.IncreaseBpp' must have class/struct/union type
D:\visual\convertir\convertir.cpp(19) : error C2228: left of '.SetJpegQuality' must have class/struct/union type
D:\visual\convertir\convertir.cpp(20) : error C2228: left of '.Save' must have class/struct/union type
D:\visual\convertir\convertir.cpp(20) : error C2065: 'CXIMAGE_FORMAT_JPG' : undeclared identifier
D:\visual\convertir\convertir.cpp(25) : error C2228: left of '.Load' must have class/struct/union type
D:\visual\convertir\convertir.cpp(26) : error C2228: left of '.IsValid' must have class/struct/union type
D:\visual\convertir\convertir.cpp(28) : error C2228: left of '.IsGrayScale' must have class/struct/union type
D:\visual\convertir\convertir.cpp(28) : error C2228: left of '.IncreaseBpp' must have class/struct/union type
D:\visual\convertir\convertir.cpp(29) : error C2228: left of '.Save' must have class/struct/union type
D:\visual\convertir\convertir.cpp(34) : error C2228: left of '.Load' must have class/struct/union type
D:\visual\convertir\convertir.cpp(35) : error C2228: left of '.IsValid' must have class/struct/union type
D:\visual\convertir\convertir.cpp(37) : error C2228: left of '.Resample' must have class/struct/union type
D:\visual\convertir\convertir.cpp(38) : error C2228: left of '.Save' must have class/struct/union type
Error executing cl.exe.

convertir.exe - 20 error(s), 0 warning(s)

lo q me pasa es obvio, no encuentra la clase 'CxImage' , pero yo baje el codigo de Cximage, lo compile con visual c++ 6, cree el .lib, incluia todas las funciones q aparecen ahi, lo puse en la carpeta y lo linkie, con el jpeg.lib lo mismo hice, pero no anda y no se q pasa.

y con dev-c++ creo q no se puede linkear a un .lib no? solo a un .a? alguien me lo puede confirmar.
22  Programación / Programación Visual Basic / Agregar boton en explorador de windows en: 11 Junio 2007, 09:23 am
Alguien sabe como agregar un boton en la barra del explorador de windows (como el de yahoo)??

busque pero es dificil ya q aparece de todo menos lo q quiero jeje. Me imagino q debe ser agregando una dll o algo asi?? , pero no tengo ni idea como hacerlo.

Si alguien tiene info de esto o algun link interesante....

Gracias.
23  Programación / Ingeniería Inversa / Sustituir opcodes q tengan "00" por otras instrucciones. en: 8 Junio 2007, 09:24 am
hola hay alguna forma de sustituir estas instrucciones por otras q no contengan "00".

"instruccion                = opcode"

add [bx+si],al            = 0000
add bh,ah                  = 00E7 
add [bx+di],al            = 0001
mov di,[di+0x0]         =  8B7D00
call 0x10a                  =  E89000
push word 0x2            =  680200
push word [di+0x0]     = FF7500   

todas tienen 00 y si son pasadas por una funcion como strcpy se termian el el null. hay alguna alternativa?

add [bx+si],al   esta creo q la puedo separar en varios pasos no?? algo asi:
 
xor eax, eax
add eax,bx
add eax, si
add [eax], al

pero no estoy seguro si alguna de esas 4 nuevas instruc tienen 00.

Pd: hay algun programita simple q le escriba la instruccion en asm y me de el opcode, sin tener q estar compilando con nasm y mirar asi podria buscar otras, se entiende??
24  Programación / Ingeniería Inversa / diferencias entre compilacion de dev-c++ y visual c++ en: 30 Mayo 2007, 07:07 am
hola me gustaria saber si alguien sabe q diferencias existen entre un programa compilado con dev-c++ y el mismo en visual c++.

Si no me equivoco el codigo generado por visual c++ es mas entendible cuando abro el prog en el olly, en cambio en dev-c++ es diferente y algo mas dificil de entender a simple vista, es decir una misma rutina la hace de una forma mas complicada y se tarda mas en comprender q hace.
me gustaria q diferencias hay entre los 2?
Páginas: 1 2 [3]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines