Page 1 of 1

i can't zoom a picture to the specified width and height

Posted: 2012-11-20T00:50:58-07:00
by lezi1022
try
{
Blob blob(static_cast<const void*>(buf), stStat.st_size);
Geometry geo(22,22);

Image image( blob );
image.zoom(geo);
image.write("2.jpg");

}
catch( Exception &error_ )
{
cout << "Caught exception: " << error_.what() << endl;
return -1;
}

but i get a 22X17 picutre,how can i get a 22x22 picture?

Re: i can't zoom a picture to the specified width and height

Posted: 2012-11-20T01:34:09-07:00
by lezi1022
i got it, use 22x22! or geo.aspect(ture);