Error Convert JPG to JP2 on Windows Platform

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
porkyng

Error Convert JPG to JP2 on Windows Platform

Post by porkyng »

I came across a problem Converting JPG to JP2 on Windows Platform where the error did not appear when I was working on a Mac/Unix

The following is the command I typed on Windows:
>> imconvert 001.JPG -quality 100 -define mode=int 001.jp2
imconvert: unable to create image '001.jp2' @ error/jp2.c/WriteJP@Image/877

*I renamed the convert -> imconvert to prevent confusion with paths
viewtopic.php?f=3&t=15933
note: The renaming of convert -> imconvert did not solve the issue
and I doubt the file size is an issue of the error

I also checked ImageMagick Delegates under imconvert -list configure
and jp2 is listed as one of the delegates on ImageMagick 6.6.1

The exact command is typed on Mac/Unix system and it ran flawlessly.

I really need to get this command working on the Windows Platform. Hope some expert can give me some useful suggestions.

I'm running on Win7 x64, Intel Xeon, 12GB RAM
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error Convert JPG to JP2 on Windows Platform

Post by snibgo »

Your command works for me on Windows 7, IM 6.6.0-8. Can you post the input image? What IM version are you on?
snibgo's IM pages: im.snibgo.com
porkyng

Re: Error Convert JPG to JP2 on Windows Platform

Post by porkyng »

Image

As you can see from the input image, convert works on other conversion such as jpg -> tif
but convert does not work on converting from jpg -> jp2

I am using ImageMagick version 6.6.1 as mentioned above

Note: This computer is recently formatted, not sure if there is any scripts/program I am missing to run convert jp2 properly
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error Convert JPG to JP2 on Windows Platform

Post by snibgo »

Sorry, I don't know what the problem might be. You might try:

- Can you convert any images to jp2? Eg "imconvert logo: logo.jp2".

- Run the convert with "-debug all". That might provide a clue to what is failing.
snibgo's IM pages: im.snibgo.com
porkyng

Re: Error Convert JPG to JP2 on Windows Platform

Post by porkyng »

imconvert logo: logo.jp2 works perfectly

it seems it is a windows permission problem
I found another post which was talking about the same issue I had

viewtopic.php?f=3&t=16024&start=0

Thanks Everyone
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error Convert JPG to JP2 on Windows Platform

Post by fmw42 »

your input jpg may be corrupt. or you may need to upgrade your libjpeg

try

convert logo: logo.jpg
convert logo.jpg JP2:logo.jp2
Post Reply