Slow export of large PNG images in Photoshop

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
appelgurk
Posts: 12
Joined: Mon Nov 27, 2006 10:09 am
Location: Oslo | Stockholm
Contact:

Slow export of large PNG images in Photoshop

Post by appelgurk »

Exporting large (12000 px wide) PNG-files with Photoshop's "Save for Web" is takes forever. A message window in PS also point out that the feature is not made for such large images.

But I have found no other way to export PNG's with an alpha channel. Normal Save As... + PNG greys out alpha channel options. Is there another way around?


/Apl
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Photoshop save for web was "invented" for the web, this may be why it has some trouble with very large files. I haven't had too many problems with it but yes... it can be slow with large files. I suppose more ram might speed it up.

I do find it annoying that PS can't save PNG with transparency without using save for web.

You may want to find another application that handles PNG files with transparency. Like the Gimp which is free.

-vern
appelgurk
Posts: 12
Joined: Mon Nov 27, 2006 10:09 am
Location: Oslo | Stockholm
Contact:

Post by appelgurk »

One image of 12000 x 1920 pixels took 6 minutes 40 seconds to save for web on a 2.1Ghz Dual Core 2, 2GB RAM and a pretty decent gfx-card. No wonder my 15-layer-composition went crazy.

Does the Gimp have a similar Export to Moho script available?

This is quite an issue when working on large scale projects. I'll have to dig into it some more. Perhaps there is a way to script Photoshop into going another route?


/Apl
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

At that size with 15 layers...

I would suggest you create a flattened duplicate with transparency and save for web. See if that is faster. If so you could "pre-flatten" before exporting.

Each of those 15 layers is the same as having 15 separate documents open at the same time. Photoshop has to treat each layer as a separate RGB file (it is actually). I suppose when saving for web this could be part of the problem.

I don't think Adobe intended that size of file for Save For Web export.

I don't think the Gimp has support for Photoshop layers but I don't know for sure.

-vern
User avatar
Touched
Posts: 504
Joined: Mon Dec 11, 2006 7:33 am
Location: Sunny California
Contact:

Post by Touched »

I'm still using Photoshop 5.5, which has no "save for web" feature, so a simple "save as" or "save a copy" works for PNG + alpha channel. But the Moho export script doesn't work in a version so old.

From what I understand from the description, GIMP supports Photoshop layers. Don't forget in addition to GIMP, there's also the free Paint.NET (for Windows), though I don't know if it would serve your purpose. Neither of them have export to Moho scripts to my knowledge.

Alternatively, as Vern suggested, flatten the document for saving. You can always undo the flatten after saving.
User avatar
slowtiger
Posts: 6082
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

I just did a test with a file of the same dimensions in PS 7 on a 1.8 GHz Dual PPC G5 with 1.5 GB RAM. I flattened everything to one layer before exporting. Saved in psd format file size was 85 MB.

1. try: about 6 minutes, mostly because the export window was still set to 8bit PNG.

2. try: about 3 minutes. This time I had the settings right from the beginning, 24bit PNG.

Theoretically the time could be shortened even more, but PS doesn't remember the settings of which view is visible and by default opens every image in "optimized" instead of "original". Creating this optimized view needs the same time as writing the file to disc.

I can live with 3 minutes. After all I don't have that many panning backgrounds of that size ...

Did anybody test the path function of PS for cropping images? It works nicely for print and is basically just another bezier shape. Does AS recognize it?
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

If this is a "panning" background PNG image, what is the transparency for? I'm just curious.

Instead of one HUGE GIGANTIC panning image exported in one gigantic piece, break it into chunks import to AS and line them up or overlap them.

Or, if The Gimp (or similar) can handle those large files then you could save as targa or tiff with an alpha from PS very quickly and use some other application to convert to PNG.
(both PS and The Gimp each have their own scripting ability. You could use a script to save out from PS and a script in the Gimp to convert to PNG)

No, AS doesn't recognize the path masking in Photoshop. That is an EPS only feature. If you want a path mask you are much better off drawing it in AS anyway.

-vern
Last edited by heyvern on Thu Feb 22, 2007 10:59 pm, edited 1 time in total.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Only for curiosity: Could you please ilustrate us why do you need a 12000x1920 image?
appelgurk
Posts: 12
Joined: Mon Nov 27, 2006 10:09 am
Location: Oslo | Stockholm
Contact:

Post by appelgurk »

The scene I am working on requires panning and zooming over large distances. Good old-fashioned multiplane effect, using transparency to blend the layers nicely together.

The final composition is made in moho's 3d space, not in Photoshop. Basicly, the layers are first roughly set up in moho. Then they have to be adjusted in photoshop to fix bugs in overlapping, making sure it works for the entire intended camera-movement. The layers are then reloaded in Moho to see if the adjustments were succesful.

This is a trial and error process. Each layer has to be worked on to some extent and then has to be reloaded, often several times. 6 minutes for an update that MIGHT work does not go well with the schedule..

However, since the layers are not dependent of the composition in Photoshop, the Export to Moho script is not important. (Although it is nice for batch-importing the layers the first time).

Having an additional older version of Photoshop installed might be the best solution. GIMP has limited support for PSD, according to its manual, only supporting older Photoshop versions.


/Apl
Last edited by appelgurk on Thu Feb 22, 2007 11:17 pm, edited 1 time in total.
appelgurk
Posts: 12
Joined: Mon Nov 27, 2006 10:09 am
Location: Oslo | Stockholm
Contact:

Post by appelgurk »

...and the final output resolution is 2048x1107 pixels, for printing to 35mm film.


/Apl
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Thanks for your explanation.
User avatar
slowtiger
Posts: 6082
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Those dimensions are totally reasonable. A quick estimation of dimensions:

My final output is about 2000 px wide (that would be HDTV or 35mm film). A moving background has to be wider, and the faster it moves, the wider it has to be. Even a repeating background has to be at least 3x as long as the frame, in this case 6000 px. Now allow for some vertical movement as well, or do a tilted pan, or zoom in or out in the scene, and you easily need a height of 2000 px as well.

Transparency means there is more than one background level, for multiplane effect. That means that the level nearest to camera is the fastest, therefore it has to be the largest one.
Post Reply