如下是一个用于图片缩放的demo,奇怪的是图片有时能显示有时不能显示,函数返回值均没有问题,求解
#include <graphics.h>
#include<windows.h>
#include <conio.h>
int main(){
initgraph(640, 480);
IMAGE img;
loadimage(&img, "1.png");
HDC easyx_win = GetImageHDC(); // 是 easyx 绘图窗口
HDC img_hdc = GetImageHDC(&img); // img 是自己加载的图片
SetStretchBltMode(easyx_win, STRETCH_HALFTONE);
StretchBlt(easyx_win, 0, 0, 300, 440, img_hdc, 0, 0, 1200, 1758, SRCCOPY);//这里炸了
FlushBatchDraw();
putimage(300, 0, &img);
_getch();
closegraph();
return 0;
}