ImageMagick Image.read()出错

[复制链接]
查看11 | 回复1 | 2021-1-27 06:56:27 | 显示全部楼层 |阅读模式
用VS2008编了个程序,想读入个图片,然后对图片进行处理,但是在读入图片的时候出错
#include"stdafx.h"

#include
#include
usingnamespacestd;
usingnamespaceMagick;
intmain(intargc,char**argv)
{
InitializeMagick(*argv);
//Constructtheimageobject.Seperatingimageconstructionfromthe
//thereadoperationensuresthatafailuretoreadtheimagefile
//doesn'trendertheimageobjectuseless.
Imageimage;
try{
//Readafileintoimageobject
stringstdu="01-42.gif";
image.read(stdu);
//readImages(&image,"01-42.gif");
//Croptheimagetospecifiedsize(width,height,xOffset,yOffset)
//image.crop(Geometry(100,100,100,100));
//Writetheimagetoafile
//image.write("x.gif");
}
catch(Exception&error_)
{
cout

在image.read(stdu);这里出错
错误信息:read.exe中的0x770115de处未处理的异常:0xC0000005:读取位置0x00000000时发生访问冲突

网上说这种是指针出错,但是我看了几个ImageMagick的程序,都是这样用
求解答
分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:56:27 | 显示全部楼层
求解决啊啊啊啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行