When i try to convert tiff to jpeg I get exception

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

cday wrote:No problem with NConvert 7.10 32-bit...

Is your problem that you don't get an output file when I am getting one, in which case your problem may lie elsewhere?

In that case it might be best to back up a bit and try using simpler code or to check for very basic issues.

One of the problems with using the command line is that it is very intolerant of errors...
I tried with other tiff files and it converted and given output file.But in this case I wont get output file at all.
Still wondering what is the difference between your environment and mine.
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: When i try to convert tiff to jpeg I get exception

Post by cday »

punith8626 wrote:I tried with other tiff files and it converted and given output file. But in this case I wont get output file at all.
Still wondering what is the difference between your environment and mine.
I can't spend any time on this today as I have something that I need to complete within a time limit.

The code I tested used the .tif extension whereas the code you originally posted used the .tiff extension, that is something you could test quickly... I can't immediately comment on the possible significance of that.
User avatar
xnview
Author of XnView
Posts: 44576
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: When i try to convert tiff to jpeg I get exception

Post by xnview »

your tiff file seems to have old jpeg encoding, but the data are not good...
Pierre.
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: When i try to convert tiff to jpeg I get exception

Post by cday »

xnview wrote:your tiff file seems to have old jpeg encoding, but the data are not good...
Can you say if the file has more than one page?

What is surprising is that XnView software ['Classic, 'MP, XnConvert and NConvert with my minimal script] which is normally quite intolerant of malformed files will open the file, although only the first page if it is a multipage TIFF...
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

cday wrote:No problem with NConvert 7.10 32-bit...

Is your problem that you don't get an output file when I am getting one, in which case your problem may lie elsewhere?

In that case it might be best to back up a bit and try using simpler code or to check for very basic issues.

One of the problems with using the command line is that it is very intolerant of errors...

When i try to convert still i get same exception like above.Please help me on this.
I am using windows 7 with nconvert licensed 6.95
I am using below command to convert and no success.

Code: Select all

nconvert -out jpeg  -o C:\Users\p\Desktop\tiff\t\test2.jpeg C:\Users\p\Desktop\tiff\t\test2.tif

Code: Select all

my_error_exit...<Not a JPEG file: starts with 0x00 0xf3>
my_error_exit...<Not a JPEG file: starts with 0x00 0xf3>
my_error_exit...<Not a JPEG file: starts with 0x49 0x49>
my_error_exit...<Not a JPEG file: starts with 0x00 0xf3>
my_error_exit...<Not a JPEG file: starts with 0x00 0xf3>
  Error: Don't know how to read this picture (C:\Users\p\Desktop\tiff\t\test2.tif)
Last edited by punith8626 on Wed Apr 25, 2018 12:14 pm, edited 2 times in total.
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

Still waiting for the reply.
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: When i try to convert tiff to jpeg I get exception

Post by cday »

You have the detailed ImageMagick error report on your TIFF in one of your earlier posts above, and also Pierre's statement that the file uses an old format and is in any case corrupt.

Although you have purchased a licence, there is a limit to the support that Pierre can provide with his workload, and anyone else who posts on the forum does so entirely as a volunteer and unremunerated.

Reading the long thread again quickly, I don't know what further help I could provide having already made a series of tests and reported the results.

I don't in any case see your TIFF file now, can you upload it again or provide the file name, in case anyone else help?

Edit:

Do you know which software or scanner produced the defective file, using that term in an online search might provide useful background information, and possibly lead to a way to repair the file...
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

cday wrote: Wed Apr 11, 2018 7:42 am You have the detailed ImageMagick error report on your TIFF in one of your earlier posts above, and also Pierre's statement that the file uses an old format and is in any case corrupt.

Although you have purchased a licence, there is a limit to the support that Pierre can provide with his workload, and anyone else who posts on the forum does so entirely as a volunteer and unremunerated.

Reading the long thread again quickly, I don't know what further help I could provide having already made a series of tests and reported the results.

I don't in any case see your TIFF file now, can you upload it again or provide the file name, in case anyone else help?

Edit:

Do you know which software or scanner produced the defective file, using that term in an online search might provide useful background information, and possibly lead to a way to repair the file...


I am not sure about the scanner.
Last edited by punith8626 on Wed Apr 25, 2018 12:13 pm, edited 2 times in total.
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: When i try to convert tiff to jpeg I get exception

Post by cday »

punith8626 wrote: Thu Apr 12, 2018 11:18 amam not sure about the scanner.
Is it possible you could find out if you make enquiries?

I've tried with NConvert 4.78 dated March 14 2007, the earliest version available for download, and that doesn't open it either.

Have you tried posting on the ImageMagick or other forums?

If you could find out how the file was created, that might possibly enable you to make some progress using a search engine, otherwise the only hope would seem to be try to find an old software that might open it, even though it is in any case seemingly malformed.
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

cday wrote: Thu Apr 12, 2018 12:49 pm
punith8626 wrote: Thu Apr 12, 2018 11:18 amam not sure about the scanner.
Is it possible you could find out if you make enquiries?

I've tried with NConvert 4.78 dated March 14 2007, the earliest version available for download, and that doesn't open it either.

Have you tried posting on the ImageMagick or other forums?

If you could find out how the file was created, that might possibly enable you to make some progress using a search engine, otherwise the only hope would seem to be try to find an old software that might open it, even though it is in any case seemingly malformed.
The problem is that this tiff file is able to convert using Laserfiche but not any other tool.

I have tried with older versions also but no success.
Last edited by punith8626 on Mon Apr 23, 2018 1:49 pm, edited 1 time in total.
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

Same image conversion works fine if we use coolutils.
May be that will help us to find the solution for nconvert ?
https://www.coolutils.com/CommandLine/T ... eConverter
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

Did you try with coolutils. I tried with coolutils and i am able to convert that image.
I need to make this to work with Nconvert.
I tried all the versions of nconvert from 4.78 to 7.12 and still no success.
Please help me.
Last edited by punith8626 on Thu Apr 19, 2018 2:25 pm, edited 1 time in total.
cday
XnThusiast
Posts: 4136
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: When i try to convert tiff to jpeg I get exception

Post by cday »

punith8626 wrote: Thu Apr 19, 2018 1:35 pm Did you try with coolutils. I tried with coolutils and i am able to convert that image.
I need to make this to work with Nconvert.
I tried all the versions of nconvert from 4.78 to 7.12 and still no success.
Please help me.
Pierre is the only developer for all XnView software, and with his present high workload I think he would be unlikely to spend time adding support for a rarely used and deprecated format, even if you offered to pay him to do so... Though, ultimately, I suppose everything has a price! :wink:

Out of interest, what would be the advantage of being able to use NConvert rather than CoolUtils?
punith8626
Posts: 48
Joined: Thu Feb 02, 2017 11:22 am

Re: When i try to convert tiff to jpeg I get exception

Post by punith8626 »

Here is the update from Image magic where they are able convert this kind of image.We can do something with our nconvert ?
https://www.imagemagick.org/discourse-s ... 94#p155612