Error 80041771 when resizing

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
edmozley
Posts: 1
Joined: 2014-08-08T08:50:16-07:00
Authentication code: 6789

Error 80041771 when resizing

Post by edmozley » 2014-08-08T08:54:55-07:00

Hi

I am trying to resize an image in ASP classic and although it does re-size the file it comes up with an error.

My code is as follows

Code: Select all

Set img = Server.CreateObject("ImageMagickObject.MagickImage.1")
  sourceFile="d:\intranets\mybwb\tenders\staffphotos\" & FileName
  destFile="d:\intranets\mybwb\tenders\temp\ResizedPhoto.jpg"
  img.Convert SourceFile, "-resize", "640x480", DestFile
Set img = Nothing
The error I receive is:

<font face="Arial" size=2><p>ImageMagickObject.MagickImage.1</font> <font face="Arial" size=2>error '80041771'</font><p><font face="Arial" size=2>An external object raised an error. No Error Description Available.</font><p><font face="Arial" size=2>/tenders/resizeforemail.asp</font><font face="Arial" size=2>, line 27</font>

I have installed ImageMagick-6.8.9-Q8 64 bit on a Windows 2008 R2 (64 bit) server.

My temporary workaround is to add...

Code: Select all

On Error Resume Next
... at the top but I don't like using this as if there are other problems in the code it will plough on regardless.

Has anyone come across this sort of thing?

Thanks very much

Ed

Werty
Posts: 59
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Error 80041771 when resizing

Post by Werty » 2014-08-10T08:33:07-07:00

Others have reported same error when using VB, and it's not only when resizing.

No solution as of yet, other than what you have done yourself, by adding an error handler.

Read this thread...
viewtopic.php?f=1&t=25900
Windows 7 user

icanfind
Posts: 1
Joined: 2014-11-03T20:56:23-07:00
Authentication code: 6789

Re: Error 80041771 when resizing

Post by icanfind » 2014-11-03T21:02:24-07:00

Code: Select all

Set img = Server.CreateObject("ImageMagickObject.MagickImage.1")

  sourceFile="d:\intranets\mybwb\tenders\staffphotos\" & FileName
  destFile="d:\intranets\mybwb\tenders\temp\ResizedPhoto.jpg"

  ' img.Convert SourceFile, "-resize", "640x480", DestFile
  img.Convert "", SourceFile, "-resize=640x480>",  DestFile

Set img = Nothing

If you want to use "Identify"

Code: Select all

msgs = img.identify("-format=%w, %h, %d, %e, %f, %g, %i,%k, %l, %m, %n, %o, %q, %r, %t, %u, %x, %y, %Z","",SourceFile)
response.write msgs
If you want to use "Identify" Width

Code: Select all

w = img.identify("-format=%w","",SourceFile)
response.write w 
If you want to use "Identify" Height

Code: Select all

h = img.identify("-format=%h","",SourceFile)
response.write h
if you want "Crop, format Convert, Repage(Eleminate none Required Area), resize, rotate" image

Code: Select all

  Set img = Server.CreateObject("ImageMagickObject.MagickImage.1")

   origImg = server.mappath("/imageMagick/")&"/"&"org.jpg"  

  imImg_crop_w = 300
  imImg_crop_h = 400
  imImg_crop_x = 300
  imImg_crop_y = 100 

  ' Crop,  resize, jpg->gif. repage 
  img .Convert "",  origImg, "-crop="& imImg_crop_w &"x"& imImg_crop_h &"+"& imImg_crop_x &"+"& imImg_crop_y,   "-resize=250x250>",  "+repage",  server.mappath("/imageMagick/")&"/"&"r_"& imImg_crop_w &"_"& imImg_crop_h &"_"& imImg_crop_x &"_"& imImg_crop_y &"crop and resize and repage.gif"

  ' Crop,  resize, jpg->gif.repage, rotate
  img .Convert "",  origImg, "-crop="& imImg_crop_w &"x"& imImg_crop_h &"+"& imImg_crop_x &"+"& imImg_crop_y,   "-resize=250x250>",  "+repage", "-rotate=90", server.mappath("/imageMagick/")&"/"&"r_"& imImg_crop_w &"_"& imImg_crop_h &"_"& imImg_crop_x &"_"& imImg_crop_y &"crop and resize and repage rotate.gif"

-------------------------------------------------------------------

Post Reply