Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Preview cannot do a save as if JPG file is locked

Hi,


Is there a work around how can preview save a locked JPG file? PNG's can do a save as in preview even if is locked.


here is the error below.


User uploaded file


the reason why i want to find out is because outlook saves their attachment files locked and if i open them in preview, i cannot do a save as on JPGs.


i have not tried any other image viewer to automatically open the attachments and save them. PNG attachements behave alright so why can't JPGs?

Posted on Feb 16, 2012 8:58 PM

Reply
18 replies

Feb 16, 2012 10:22 PM in response to kurt188

hi Kurt188,


the source file is a jpg that is locked and save in ~/Library/Cache/TemporaryItems/Outlook Temp/ which means that the file opened by preview is an outlook attachment.


since we want a copy of the attachement opened by preview, we do a save as and we get that error when we try to save it in desktop or which ever location possible.


i even took a picture directly from a camera, jpg in format, saved on my desktop, locked it, opened via preview, then same issue.


PNG files dont have this issue.


What OS are you using by the way?

Feb 16, 2012 10:34 PM in response to boink boink

I'm currently running 10.4.11, and I can perform Save As… for any locked file type that Preview opens (except to places where I don't have write permission). I think it would be really strange if Apple had omitted this ability for .jpg images, but kept it for others; that would make no sense at all.


You could have some problems with your permissions, or it could even be a bad .plist file.


I know some people say repairing permissions makes no difference and is a waste of time, but instead of relying on people who aren't OS engineers and leaving it to their non-expert viewpoints and biases, I trust Apple put that ability there for a purpose. While it may not solve the problem, it won't do any harm.


There will always be permissions that are changed in that process, which is completely normal, so running it multiple times and obsessing over what it says is pointless. As long as you get the message at the end that says "Permissions repair complete", that's the only thing you need to pay attention to.

Feb 16, 2012 10:42 PM in response to kurt188

Reparing the permission will not help unfortunately. i tested multiple 10.6.8 machines and still the same issue. i know it is now a file issue as well.


i tested a 10.5.8 machine and it is working!


seems to be a 10.6.8 issue here in the office. i'll test it on my home computer as well before i give Apple a call.


it's a small feature but really important if your using outlook.

Feb 16, 2012 10:49 PM in response to boink boink

You mean it's an issue with the image file, with an Outlook file, or a Mac OS X file? If the image file is corrupt, there's not much you can do about that, but if it's an Outlook file (like the .plist), you might be able to solve the problem by removing the corrent one and letting Outlook create a new one.


Of course, you'd have to make a backup of all your Outlook mail first and then recreate those accounts and other preferences when you do that.

Feb 16, 2012 11:23 PM in response to boink boink

boink boink wrote:


Is there a work around how can preview save a locked JPG file? PNG's can do a save as in preview even if is locked.

I don't know anything about Outlook and its attachments.


However, I tested locked JPEGs and PNGs in Preview, and I find no problem whatsoever. File > Save As… seems to function in the same way, irrespective of the format -- indeed, irrespective of whether the file is locked or not. If that's not the case for you, then you may have a problem -- corruption, misconfiguration, whatever. But I don't think you can judge by the behaviour of files saved in temporary locations by other applications.

i even took a picture directly from a camera, jpg in format, saved on my desktop, locked it, opened via preview, then same issue.


PNG files dont have this issue.

What exactly is the issue?

Feb 16, 2012 11:33 PM in response to fane_j

hi fane_j,


what OS are you using?


for the issue, i still can't do a save as jpg when it is locked.


it's like this, i use outlook to receive emails. if someone sends me an email with a jpg attachement, i open it by double clicking on the attachment then it opens preview. if i need to save the file, i need to do a save as so i can edit the location where to save it then i get the error i posted above. does not happen with PNG or other documents.


i recreated the scenario by using a jpg file from a camera, locked it, opened with preview then do a save as, then i get the same error like when i wanted to save an attachment jpg opened by preview.


it works on 10.4.x as kurt told me, works on 10.5.8 which i just tested.

Feb 16, 2012 11:46 PM in response to fane_j

i discovered this issue when a user reported that he cannot save a file he opened from outlook. i can say it is not an outlook issue since i was able to replicate it using a file from a camera that i locked.


please check this link, http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macoutlook/cannot-sav e-attachments/d7e3e70b-04dd-469d-b2ac-8e49619822fe

Feb 17, 2012 12:05 AM in response to boink boink

Hold on… I was wrong. My mistake was in testing Save As only after modifying the JPEG. But, if I do Save As without any editing, I get exactly the same error.


So, IMHO, you've found a bug in Preview; unfortunately, I don't think it will ever be fixed. What you need is a work-around.


You could edit the JPEG (eg, move slightly the quality slider in the Save As dialogue box). Then Save As will work.


Possibly there are other alternatives.

Feb 17, 2012 6:11 AM in response to boink boink

boink boink wrote:


the users reallly dont want to edit the jpgs because they want to use it as is.

That I can understand. However, they also seem to want to Save As. If, after they choose File > Save As, simply move the quality slider (under Format: JPEG) a little to the right, the picture will not change in any noticeable way (except a slight increase in size), but Save As will work.


There are other alternatives. I can offer only a few suggestions, because I don't have or use Outlook. Perhaps Outlook can be configured to use a different app to view JPEGs. ColorSync Utility, bundled with the OS, can be used as a basic image viewer and it is not affected by this bug. Alternatively, Xee by Dag Ågren is a free image viewer; if you want to pay, there are a few other utilities, including the king of image tools, Graphic Converter.


If you have to use Preview, you can try scripting. Preview as such is not scriptable, but I think it's possible to devise a cunning script to determine with lsof what JPEGs are open in Preview, then copy them to the desired location, and, for good measure, unlock them with chflags.

what if it is a document that is saved on desktop directly that got locked?

Well, that's easy -- just unlock it. Even if the file is already open in Preview, you can unlock it in Finder and then Save As will work. All you have to do is ⌘Click on the file name in the window's title bar, etc.

Preview cannot do a save as if JPG file is locked

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.