
在HDevelop中
read_image(Image1,'D:/bb/tu/ma.jpg') get_image_size (Image1, Width, Height) zoom_image_size(Image1,ZooImage, 200, 100, 'bilinear') *功能:將圖像縮放到給定大小 *參數1:原圖像 *參數2:縮放后保存的圖像 *參數3:圖像的寬度,默認值:512 * 建議值:128、256、512 * 典型值范圍:2≤ 寬度≤ 512 * 最小增量:1 * 建議增量:10 * *參數4:圖像的高度, 默認值:512 建議值:128、256、512 * 典型值范圍:2≤ 身高≤ 512 * 最小增量:1 建議增量:10 *參數5:插值類型 * 默認值:'constant' * 值列表: 'bicubic', 'bilinear', 'constant', 'nearest_neighbor', 'weighted' get_image_size (ZooImage, Width1, Height1)

在QtCreator中
HObject ho_Image1, ho_ZooImage; HTuple hv_Width, hv_Height, hv_Width1, hv_Height1; ReadImage(&ho_Image1, "D:/bb/tu/ma.jpg"); GetImageSize(ho_Image1, &hv_Width, &hv_Height); ZoomImageSize(ho_Image1, &ho_ZooImage, 200, 100, "bilinear"); //功能:將圖像縮放到給定大小 //參數1:原圖像 //參數2:縮放后保存的圖像 //參數3:圖像的寬度,默認值:512 // 建議值:128、256、512 // 典型值范圍:2≤ 寬度≤ 512 // 最小增量:1 // 建議增量:10 // //參數4:圖像的高度, 默認值:512 建議值:128、256、512 // 典型值范圍:2≤ 身高≤ 512 // 最小增量:1 建議增量:10 //參數5:插值類型 // 默認值:'constant' // 值列表: 'bicubic', 'bilinear', 'constant', 'nearest_neighbor', 'weighted' GetImageSize(ho_ZooImage, &hv_Width1, &hv_Height1); int Width=hv_Width.I(); int Width1=hv_Width1.I(); int Height=hv_Height.I(); int Height1=hv_Height1.I(); qDebug()<<"Width="<<Width; qDebug()<<"Height="<<Height; qDebug()<<"Width1="<<Width1; qDebug()<<"Height1="<<Height1;


