Jump to content

Error resaving .tif as .jpg


Crazy Man Dan

Recommended Posts

Greetings smarter people!

I recommended Paint.NET to a client for resizing images of their products to put on an online store. They downloaded it, installed it, went to use it, and encountered the error: "There was an unspecified error while saving the file."

What they did was opened a .tif, resized it, and tried saving it as a .jpg. So I searched my system for .tif files, found a few (not very many, actually), and tried them out. Some of them worked, but I did find one that recreated this same error.

Funny thing is, .jpg seems to be the only format that causes an error. I was able to successfully save the errant .tif file as a .png, .gif, .tga, .bmp, and .tif (I didn't try any other formats). Also, if you open the .tif and save it as a .tif, close the window, and open the new .tif, saving as a .jpg works just fine.

I'm not very familiar with .tif, or what it takes to save it, but the client needs to resize many .tif images, and having to resave every one, close each window, THEN resizing and saving as a .jpg isn't really a viable option.

The .tif file that's been causing problems is 3.11MB, and I can't upload it to my Photobucket album, so if you'd like to take a look for yourself, just ask and I can e-mail it to ya.

Thanks for your help,

Dan Larson

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Alrighty, I sent it to the email listed on the getpaint.net contact page. I think that's the right one... I've never had to email you guys (or you guy, as it were...) before. :)

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Yeah, I know files get corrupted. That, and it was made on a Mac...

Thing is, though, PDN doesn't consistantly break. This is how my graphics apps interact with the file:

When I open it with The GIMP, it points out some errant tags within the file, then opens it with the wrong colors.

Artweaver just opens it with the wrong colors.

Paint.NET opens it with the proper colors, and it breaks ONLY when trying to save it as a JPG. It saves it just fine as a PNG, TGA, GIF, TIF, et cetera, just not JPG.

I can open it in PDN, save it as a TIF, then re-open it, and it works just fine. Funny thing is, if I open the new TIF in The GIMP, The GIMP points out the same errant tags, but opens it with the proper colors...

I really don't know what's up. I DO know it was made with Adobe PhotoShop or LiveMotion, one of the two, and Adobe loves putting in extra bloody potato, neverminding what other app they may break. Like their GoLive software, using extra bloody potato in the CSS tags, tends to screw with the JavaScript Document Parse Tree. That kinda stuff...

Thing is, other images made with the same program on the same computer don't break anything. <_<

Ugh, I give up.

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

That could work for me, yes, but the client to whom I recommended Paint.NET has a bum-load of digital images of their products that were saved as TIFs, and all the ones they have tried are corrupt.

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Yeah I've been looking at this in the debugger, there is definitely some EXIF tag that is causing our JPEG saver to freak out (it's based on GDI+, go figure). The question is now how to mitigate this.

On another note, I think I figured out why saving as a PNG doesn't save the DPI setting, and I may be able to fix it.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Ok Dan, the 2.72 release this weekend will not have a fix for this. It's simply too risky to fix in the stable 2.xx branch. It will include a fix for DPI not saving/loading correctly for anything but PDN and JPG files (the fix for which I stumbled upon because of this post!), so all is not lost.

As a workaround, the customer you are working with should be able to do the following:

1) Open the TIF file in question

2) Resize as you normally would

3) Edit -> Select All (Ctrl + A)

4) Edit -> Copy (Ctrl + C)

5) File -> New (Ctrl + N)

6) Edit -> Paste (Ctrl + V)

7) Now save as whatever you want.

Essentially this will strip all the metadata out of the image so that it will save correctly.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Unfortunately, I believe they have 70+ images to resize, and that's a few too many steps to recommend. I'd be willing to go through all of their images and resave them myself for the for free, but I haven't pitched that idea to them yet.

I think they were planning on buying Photoshop Elements, or something to that effect, so I'll have to see whether or not they've done that yet.

Again, thanks for the answers! Will you be looking into fixing this for the 3.0 release?

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

I don't believe so. This would require an algorithm where it would try to save the file, and then if that failed it would step through each piece of metadata and try saving the file with only that part of the metadata. It would then catalog which metadata caused the codec to freak out, and then it would save the file again without those pieces of bad metadata.

Very bad for performance (imagine saving over to a network share) and it's still just guessing with no guarantee that it would even work.

Honestly the workaround is hardly complicated as you can do the entire thing with the keyboard, which is why I listed the shortcuts. Ctrl+A, C, N, V. Well, press enter after Ctrl+N.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Complicated, no. Tedious, yes.

It's something I'd do myself, but it's not something I'd ask a client to do.

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Hmm, well Paint.NET doesn't have any batch processing functionality at this point. So this might not really be a task well suited to it anyway, with or without the bug or workaround :(

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Yeah, that's another option I could pitch to them. Does the Image Resizer PowerToy work with TIFs? (The page doesn't say. I'd assume it'd work with all images, but I'd rather know for sure before talking to the client.)

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

Really, I don't know. Clients are wierd...

As I understand it, TIF files are high quality, 32-bit uncompressed images, mainly used for things like print media. Why they only have the TIFs, I do not know.

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

  • 11 years later...

I realize this thread is over a decade old but it came up in a Google search since I actually have this exact issue.  Here's the interesting insight that I can give to my instance.  I attend a lot of pop culture cons and I scan in images I have signed at these shows so I know what I have and so I don't make the mistake of purchasing duplicate images.  For the longest time, I've used Epson scanners to scan, resize, crop and save as .jpg files.  I always scan as .tif since it provides a better original to work from.  I've used Paint.net for eons as part of my workflow and never had any issues.  I recently purchased an HP product that can scan 11x17 images and this is when the error began.  Once I open the .tif file and clean it up, I know it's going to fail as soon as I change the file extension to .jpg and the preview window comes up blank and states there's an error.  I can perform the suggested steps of copying it over to a new image and then saving it out from there with no issues.  I just thought I 'd throw in how I've run into this issue more than 10 years after the original poster and that the HP scan seems to be creating the erroneous data.

 

Thanks,

Len

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...