Message Boards Message Boards

Is there a way to have Mathematica ignore images when saving notebooks?

Hello,

I'm currently working on an image processing project and I typically have several high resolution images in output cells of my notebook as I test different filters, etc. The problem is that this causes the notebook file to become very large, and saving causes the system to temporarily freeze while it is "Checking" the notebook prior to saving. With just 5 or 6 images in my notebook, saving can take 15-20 seconds, during which time I cannot do anything else in Mathematica.

As someone who compusively needs to save documents every few seconds, this becomes a huge inconvenience. Since I don't need to save the images themselves (the originals are on disk already), I usually delete any visible images in the notebook before saving to make sure it will complete in a reasonable amount of time, but while I'm working I often need to keep some images handy so I can compare results. Does anyone know of a preference or setting somewhere that can make Mathematica save notebooks without visible images?
POSTED BY: Richard Hennigan
3 Replies

Try Plot[.....] // Rasterize. It works wonders. Visual quality on the notebook is not compromised, but saving the notebook is in splitseconds.

A more primitive way is to shrink the image with the mouse, select the cell bracket,
and use Cell menu - ConvertTo - Bitmap.
POSTED BY: Bruce Miller
I don't think there is such a setting.

I have used the menu item [font='courier new', courier, monospace]Cell -> Delete All Output in some cases, but note that this deletes all generated output cells (including Print cells) and there is no undo on this operation. Another thing I sometimes do is making sure I save to a local drive  (in my user account the default save directory is a network backed drive which can add to the notebook save time). Finally, you may want to consider using [font='courier new', courier, monospace]ImageResize[ image, width ] on large images before you output them. That way the output cell can contain a much smaller version of the image for display, which should help with the file saving performance. And if you want to inspect an image up close you can always still use [font='courier new', courier, monospace]CreateDocument to create a temporary notebook document with the full size image (which you can then close without saving).
POSTED BY: Arnoud Buzing
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract