Jump to content
aitte

Vector files massive

Recommended Posts

So, I'm using Affinity Designer on my Commodore 64, and I want to send a vector design to my friend, but even simple files with just some vectors and zero raster data are astronomically huge - in the 100-150kb range! It fills up almost an entire 170kb 5" floppy disk! This is simply too much time to transfer on my 300 baud (0.0375 kbytes/s) modem. Before I upgrade by adding another 128kb of RAM and a CPU with more megahurts and a 1200 baud modem to my Commodore 64, I thought I'd ask: Why are the files so freaking huge to just describe some vector X/Y coordinates and layer FX?  :D I bet I could design the same file format to take less than a kilobyte for that. Is it storing some sort of raster-based preview image or something? If so, can you please allow us to disable that? I need vector designs to be super small for steganography, since I work for a secret government that's so secret that you've never heard of it.  :ph34r:

 

 

Edit: Real info here: https://forum.affinity.serif.com/index.php?/topic/14277-vector-files-massive/&p=65016

Share this post


Link to post
Share on other sites

I have fond memories of my Commodore 64, especially the ´Still loading...´ message with the cassette reader. Also of the huge size of the floppy disk reader, once I thought I needed and purchased that.  :lol:

Share this post


Link to post
Share on other sites

Not me! I was still dreaming of an Amiga, any Amiga, when I got an offer I couldn´t refuse: for a Philips 8250 MSX 2 computer, with two integrated 3.5” floppy drives and its own separate keyboard and monitor!   :P

Share this post


Link to post
Share on other sites

Security through obscurity, or what?

You know how many Windows viruses I have? None! Because I don't have Windows. I have Window. Yep. Just one window at a time on the Commodore. And viruses need many windows to get in through. My single window is guarded by my 1 megahurts CPU equipped with brass knuckles *and* a hootentoot (a type of small and very annoying musical instrument). Ain't no viruses getting on this Commodore! Anyone that tries gets a face full of brass while listening to really, *really* annoying music. Some scientists believe it's actually the music that kills them by making the viruses lose all will to live. Commodore 64 power!

Share this post


Link to post
Share on other sites

Well, I just attempted to run Affinity Designer on my ENIAC yesterday … you know, I have the second, portable version, still designed by Eckert and Mauchly. Runs pretty stable so far. True, the main issue is the missing floating-point capability, but other than that, the curves come out quite nice. (I have to admit, that late Betty Snyder had provided some decent tricks for increasing the graphics performance, years ago.) And it’s just as you said, my only concern is the size of the .afdesign files …  :huh:

 

(Any experiences with El Capitan on the UNIVAC, by the way?)

Share this post


Link to post
Share on other sites

Oh you have the portable ENIAC that only takes up half the size of a bus? You lucky sod!

Affinity, @MEB, as you can see we're all wondering how to get the filesizes down so that the files fit on our state of the art hardware. Comment please?

I know a workaround for the big .afdesign file sizes: Export the afdesign to SVG instead, to get a 1kb file. That pretty much proves that the huge afdesign filesize is due to an embedded preview. I would love an advanced option; just like "Save/don't save full document history". But "Save/don't save Finder document thumbnail". It would be trivial to add. And then just make the Finder display a neutral document icon for such files.

The 150kb .afdesign filesize for a 1KB vector is a problem for me, and exporting to SVG solves it but loses all nice layers and FX I set up so I can't edit it anymore.

Share this post


Link to post
Share on other sites

You (Serif) could also save a few bits by having 8.3 filenames, as is the industry standard.

Damn right, Affinity should follow the standard. "2015 Pepsi Design Project.afdesign" is too long and takes up too many bytes. It should be "015~PSPI.AFD".

 

Your phrasing at the end reminded me of one of my favorite geek jokes, called "Ed is the standard editor", which is the official helpfile description for the "Ed" Unix/Linux program. Ed was a very early text editor written for Unix and intended for slow remote connections and for terminals without monitors (which used paper trails and needed to save ink), so it is literally the worst text editor in the Universe with zero visual feedback and no error messages or text cursors or anything helpful like that, other than a "?" prompt to indicate that you entered an illegal command. If you somehow figure out how to use it, you have to remember what you have already written in the document you are editing, because ed doesn't even tell you that. I have been using Ed for two years now, mainly because I launched it one day and don't know how to quit it...

 

With that backstory in mind, maybe more people will get the joke. Here it is in all its glory, from 1991:

http://www.gnu.org/fun/jokes/ed-msg.html

(It also references vi and emacs, which are much more modern text editors that are so powerful that they are still in use today. They are awesome.)

 

Affinity could learn a lot about user interfaces from Ed. ;)

Affinity Designer: "?"

 

(I'm just filling time while waiting for an official reply about the filesizes...)

Share this post


Link to post
Share on other sites

Hi aitte and all,

I'm not the most suited person to reply to this but I believe the reason you're getting "huge" sizes when exporting as SVG is because you're using layer effects/filters (per your description). Vector data don't add much to the file, but all effects are rasterised increasing the file considerably. As far as i know currently Affinity doesn't translate/export SVG's filter/effects as defined by the SVG spec which would effectively reduce the file size. There may be other features forcing a rasterisation (i.e. Blend modes for example) but from your description, i don't think you're using them.

We are continuously improving file formats import/export code, so i believe those issues will be addressed at some point as we move forward.

Share this post


Link to post
Share on other sites

@MEB:

Thanks for replying. The question wasn't about SVG though, and I see now that the post I linked you wasn't 100% clear on that and could have been interpreted as relating to SVG... Sorry :-(

The problem is the size of .afdesign files. Let's say I create a logo with *only* a few curves and layer effects. I and others have noticed that if we save it as .afdesign we get a file that is hundreds of kilobytes (seems to depend on document resolution used, and graphical complexity).
If we export it as as SVG we get just the vectors (maybe 1-2kb). That solves the filesize issue, but then we lose the ability to easily edit the file later.

Since .afdesign always adds hundreds of kilobytes of "fluff" to the filesize I suspect that it is saving an embedded Finder thumbnail jpeg?

With multiple .afdesign files stored in a Git repo (for revision tracking) it really balloons the repo filesize. Every revision of a file adds hundreds of kilobytes to the repo. I would happily skip the embedded thumbnail to make .afdesign files (with just vectors and layer FX settings) in the 1-5kb range instead.

I would love an advanced option for this, if you would consider it. There is already "File - Save history with document" to toggle undo history on/off. How about "File - Document setup - Advanced - Embed Finder document thumbnail"? If documents have no thumbnail, it would just show a default document icon for that file. For backwards compatibility with old versions of Affinity products it could embed a 1x1 pixel white jpeg, so that old Finder extensions/apps can still preview and open those files. So this is totally solvable, and I sincerely hope you will consider it.

 

Edit: PROOF! :)

Here is a document with *just* a single rectangle shape.

  • In one file, I set the fill to pure black and saved it as "blackrectangle.afdesign": 4,439 bytes
  • Then I set the fill to a complex circular gradient: "gradients.afdesign": 166,142 bytes.
  • Next, I exported them as SVG to see what happens: "blackrectangle.svg": 502 bytes.
  • And "gradients.svg": 1,056 bytes.
  • To think about this in context: SVG is a very verbose, text-based XML format which is extremely inefficient at saving designs, needing up to 10 bytes per vector coordinate. Meanwhile, .afdesign is a binary format with extreme efficiency. And yet the afdesign file for a black rectangle is 8.8x bigger than an SVG, and for the colored gradient rings it's 157x bigger than an SVG.
  • This huge afdesign filesize is a problem for some of us (and a very big problem for me). Could we please disable the document preview thumbnail? It's making .afdesign filesizes massive for no worthwhile reason at all.  :(

blackrectangle.afdesign

blackrectangle.svg

gradients.afdesign

gradients.svg

Share this post


Link to post
Share on other sites

@Andy: Oh wow. I think I am in love with you. Tell your wife to get out. :wub: :lol:

 

Being able to version-control afdesign files together with the rest of the design/site code, without ballooning the Git repository size by +200kb each time I save a revision of any file, would be a dream come true.

 

Hopefully the thumbnail can just be omitted completely, but if the old Finder preview-extension chokes on that I suppose you could embed a 1x1 pixel one (which in my tests just takes up 91 bytes for RGB and 89 bytes for Grayscale). Or at worst, a 512x512 white PNG (which takes up 1117 bytes for RGB or 609 bytes for Grayscale).

 

The next version of the Finder-preview extension could detect the document-flag telling it to ignore that embedded thumbnail and just display a default document icon. Older extensions would just show the white square in the Finder until people upgrade.

 

So it seems like all of this should be solvable. Fingers crossed...

Share this post


Link to post
Share on other sites

Being a software developer myself, I know that even a small thing like "not embedding massive thumbnails" can be very hard to get to when every day is filled with critical fixes and features. I see that this got (rightfully) put to the side to deal with the countless important fixes in Designer. Congrats on getting ready to ship the next Gold Master for the App Store! Could you please let us know what'll happen with vector filesizes, though? Any potential timeframe for when a fix can be investigated? Knowing even a rough estimate would be helpful. Thanks :)

Share this post


Link to post
Share on other sites

Hello again guys,

 

Sorry about this - I'll be honest and just tell you that it got overlooked in the run-up to the 1.4 update to both apps..

 

Don't worry though - the beta programme will start up again soon and I'll make sure it gets done as soon as possible then :)

 

Thanks,

 

Andy.

Share this post


Link to post
Share on other sites

Hehe it's understandable, Andy. You've worked your butt off to finish the new versions. I just saw AD & AP 1.4 on the App Store. Congratulations. :)

 

Looking forward to the thumbnail improvements when you have time.

Share this post


Link to post
Share on other sites

Hello again guys,

 

Sorry about this - I'll be honest and just tell you that it got overlooked in the run-up to the 1.4 update to both apps..

 

Don't worry though - the beta programme will start up again soon and I'll make sure it gets done as soon as possible then :)

 

Thanks,

 

Andy.

Sweet thanks Andy. I have to say at first I thought this thread was a joke but once I saw your comment about git I realized that this would be really useful. I am looking into doing some web development as a side project (I am currently an embedded systems developer). Additionally @aitte, little off topic but you may want to check out https://git-lfs.github.com/we are currently considering using this to store entire software binaries in git.

Share this post


Link to post
Share on other sites

@william7: Thanks for the tip about large file storage for Git. Could be useful but my files aren't that big.

 

@Andy: Looking forward to the beta with this feature in it. I'll keep an eye out. Thanks for taking care of it. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×