Dear all,
I have some problem about ImageMagicK Resize function.
I found that are some difference between Original image size and resized image size after I use resize().
the code like this,
m_b = m_image; //Original Image Size is 2000x1312
m_b.resize("256x167");
PixelPacket *Pixels = m_image.getPixels(0,0,m_image.columns(),m_image.rows());
PixelPacket *bPixels = m_b.getPixels(0,0,m_b.columns(),m_b.rows());
m_b.resize("2000x1312");
int w = m_image.columns(); //2000
int h = m_image.rows();//1312
int bw = m_b.columns();//2000
int bh = m_b.rows();//1310 ??????????????????????
What am I suppose to do for solving?
the difference image size between before and after about resize
Re: the difference image size between before and after about resize
If you want to resize to exact dimensions (and inexact aspect ratio), use an exclamation point:
I am assuming that your programming interface will
handle the geometry string the same way that the commandline does.
Code: Select all
m_b.resize("2000x1312!");
handle the geometry string the same way that the commandline does.