Jump to content

Designer v2.4.2 windows 10: Why does exporting GIFs take way longer than exporting PNG, TIFF, JPEG ect?


Recommended Posts

Hi, I am currently writing my seminar thesis for my studies at university and for that I am experimenting a little bit with file sizes and formats. For that, I created a vector graphic with a color gradient and text.

I made copies with different sizes, ranging from 50x50px to 4000x4000px. Then I exported them all at once but as separate files using the export persona. When I exported them as PDF or SVG, the export worked extremely fast, as I was expecting for a vector-based image. However, JPEG and PNG also only took one or two seconds. TIFF took about 30 seconds, which I expected to be the slowest, but for the GIFs, I needed about 5 minutes and 40 seconds. When I repeated it, I got similar results.

Do you have an explanation for why there is such a big time difference? Is the algorithm behind the GIF compression simply less time-efficient? I'm looking forward to your answers.

 

image.png

SVG Example Immage 1000x1000px.svg

Link to comment
Share on other sites

Welcome to the Serif Affinity forums.

Are you exporting them to the same location, and where is that (local disk, USB disk, network, ...)?

For me, exporting just that 1000x1000 size as a GIF, using either File > Export or the Export Persona, takes about 5 seconds to a local disk on my laptop. That is slightly longer than PNG takes, but comparable.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Link to comment
Share on other sites

2 minutes ago, walt.farrell said:

For me, exporting just that 1000x1000 size as a GIF, using either File > Export or the Export Persona, takes about 5 seconds to a local disk on my laptop.

On my Mac, it took no more than 2 seconds to export it as a GIF to my desktop folder via File > Export.

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 hour ago, EEE said:

Is the algorithm behind the GIF compression simply less time-efficient?

GIF are 256 indexed colors (or pallerized) all others are not. Creating the palette takes some time, but not several minutes 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

I see your export size is 1 larger in x direction, you should fix this before export 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

On 5/11/2024 at 7:48 PM, walt.farrell said:

Welcome to the Serif Affinity forums.

Hi, thank you

 

On 5/11/2024 at 7:48 PM, walt.farrell said:

Are you exporting them to the same location, and where is that (local disk, USB disk, network, ...)?

I have exported them to separate folders on my local disc. But even when exported to the same folder there is the same difference in required time. I allso tested it on my work laptop and got the same results

 

On 5/11/2024 at 7:48 PM, walt.farrell said:

For me, exporting just that 1000x1000 size as a GIF, using either File > Export or the Export Persona, takes about 5 seconds to a local disk on my laptop. That is slightly longer than PNG takes, but comparable.

It happens for the bigger file sizes, like 4000x4000px, or when I export all the graphics as gifs at the same time. When I only export the 1000x1000 one it takes also only a few seconds. Actually I dont know why I only attatched the 1000x1000px version to my original post

 

 

 

AffinityFormatExperiment.afdesign AffinityFormatExperiment SVG 4000x4000.svg

Link to comment
Share on other sites

On 5/11/2024 at 8:19 PM, NotMyFault said:

I see your export size is 1 larger in x direction, you should fix this before export 

Actually i dont understand how that happens. When I click on the graphic the transform window says it has 4000x4000px, aswell as the measure tool. But in the export option and affter the export the x direction has that extra pixel. When I change the Size in the export options it exports it with the correct size. When I change the size of the original square in the designer persona to 4000x3999px the export format is 4000x4000px

image.png.0ab1951b22f1d7192dcef781796a94d4.png       image.png.ca2c3dd08a28ba3200096fc8cefed2a3.png

Link to comment
Share on other sites

Because the x position has fractional decimals. All objects need to be positioned to whole integers. This is a nasty story.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

2 minutes ago, NotMyFault said:

All objects need to bee positioned to whole integers. This is a nasty story.

A nasty story with a sting in the tail?

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)

Link to comment
Share on other sites

To shorten the discussion: 

on iPad Pro 2018, all regular raster exports are fast, but all palettised exports are super slow (gif and PNG with palettised option).

The issue is that the method to create the actual palette seems super slow and probably linear or even over-linear to amount of pixels. Maybe influenced by available RAM (which is quite low on iPad).

 

edit: over linear means runtime is a function of pixel count which returns value above any linear runtime. For details, see

https://en.wikipedia.org/wiki/Time_complexity#Table_of_common_time_complexities
https://en.wikipedia.org/wiki/Big_O_notation

it is a definition from computer science about the runtime dependency on input (length). 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

1 minute ago, NotMyFault said:

The issue is that the method to create the actual palette seems super slow and probably linear or even over-linear to amount of pixels.

I don’t know what you mean by “linear” in the present context, and I’ve no idea what “over-linear” might mean in any context!

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)

Link to comment
Share on other sites

It means that i did measure the export preview time:

1500x1500 takes 6 sec

2000x2000 takes 12 sec

2500x2500 takes 18 sec

this means iPad processes about 350.000 pixels per second, and export time is O(n) or linear proportional to number of pixels.

Most of the export time is to create the palette (the progress stays at 0%

Linear time complexity

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

On 5/11/2024 at 6:21 PM, EEE said:

I am experimenting a little bit with file sizes and formats

Try also with/without HW Acceleration (in application preferences).

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.5.2636 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

35 minutes ago, Affinity Rat said:

So does this means that saving a tiff file in 8 bit, is slower than 32 bit, if 8 bit palettized and 32 bit not?

I would say yes, but just test it out. It depends on many factors, including the actual image content, e.g. images with solid colors may compress by enormes factors whereas random noise or complex gradients are often the worst case.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

4 hours ago, NotMyFault said:

It means that i did measure the export preview time:

1500x1500 takes 6 sec

2000x2000 takes 12 sec

2500x2500 takes 18 sec

this means iPad processes about 350.000 pixels per second, and export time is O(n) or linear proportional to number of pixels.

Most of the export time is to create the palette (the progress stays at 0%

Linear time complexity

 

I too was unfamiliar with the term “Over-linear” your link on time complexity doesnt mention it. I searched google and found not much relevant to this context, but I’m interested, could you please expand on it.

By “over-linear” are you referring to an empirical approach vs theoretical? 

 

 

 

 

Link to comment
Share on other sites

Sorry my use of terms is a bit sloppy.

the linked article explicitly explains linear time O(n) and sublinear time below O(n).

similar, above linear or over-linear or supra-linear or super-linear time means any runtime above O(n).

For examples see O(n^2) or any table entry not belonging to sublinear or linear time.

 

to say it in other words in the context of image editor apps:

  • linear time means taking a constant time per pixel or processing a constant number of pixels per second. This is mostly the case.
  • sublinear means it gets faster with higher pixel numbers (this rarely happens, e.g. deleting a layer or file)
  • above linear means it gets slower with higher pixel numbers. 

https://en.wiktionary.org/wiki/superlinear

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

Over in the sense of larger, more, exceeding.

 

IMG_1250.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

11 hours ago, NotMyFault said:

Because the x position has fractional decimals. All objects need to be positioned to whole integers. This is a nasty story.

Uh thats quite interesting for my seminar thesis. And annoying. Now that I have repositioned the images it works and by activating the force pixel alignment i can prevent it from happening again image.png.2dc721dc8ac69da48bc605ca810b5d60.png

Link to comment
Share on other sites

13 hours ago, Pšenda said:

Try also with/without HW Acceleration (in application preferences).

Good idea, I tried, but for the gif export it did not seem to affect the time it takes. In both cases it was more or less 5 minutes 40. Maybe I would get different results with more RAM, I only have 8GB

Link to comment
Share on other sites

Posted (edited)
13 hours ago, NotMyFault said:

I would say yes, but just test it out. It depends on many factors, including the actual image content, e.g. images with solid colors may compress by enormes factors whereas random noise or complex gradients are often the worst case.

I tried the same 4000x4000px but with a solid colour instead of a gradient, it did not affect the export time I think. It was about 2min 14 export time without the gradient and

about the same with the gradient.

With the no gradient version I also tried exporting GIF greyscale with only grey scale and 2 colours. I think the result is quite interesting when zooming in and out

 

test 4.gif

Edited by EEE
Changed image
Link to comment
Share on other sites

Posted (edited)
51 minutes ago, EEE said:

With the no gradient version I also tried exporting GIF greyscale with only grey scale and 2 colours. I think the result is quite interesting when zooming in and out

Well when uploaded the image looks diferent than in my windows foto app. after downloading the image and viewing it in the app again, it looks the same as online. as it seems when uploading it the image gets compressed further when uploading it. Before the upload it was 1.192.523 Bytes and now it is 978.889 Bytes. It had a strong Moiré effect before I think

Screenshots test 4.png

Edited by EEE
Link to comment
Share on other sites

7 hours ago, EEE said:

Well when uploaded the image looks diferent than in my windows foto app. after downloading the image and viewing it in the app again, it looks the same as online. as it seems when uploading it the image gets compressed further when uploading it. Before the upload it was 1.192.523 Bytes and now it is 978.889 Bytes. It had a strong Moiré effect before I think

All your good observations are to be expected.

  • Different apps use different methods to zoom images, e.g. resample bilinear or nearest neighbor. Handling of color profiles is another issue / difference.
  • moire is often the consequence when having fine patterns
  • Affinity creates inferior palettes during export. E.g. a single colored image may get diffusion pattern of two colors instead of only one perfect matching color.
  • the affinity forum software re-compresses jpg images. So either use png, specifically for screenshots (which uses lossless compression only) or zip jpg files before upload if fine details are relevant

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.