Jump to content
You must now use your email address to sign in [click for more info] ×

PixelPerfect

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by PixelPerfect

  1. On 1/3/2020 at 10:31 AM, fde101 said:

    PNG files do not support layers.
    Neither does TIFF for that matter.

    Both PNG and TIFF support custom data blocks (you have to be a programmer to use that file format feature), and vector objects with layers is a data which can be stored inside that image file

    This is like a postal envelope, from outside it looks like a rectangle of paper, but inside it can contain other pieces of paper with images, text or numbers.

    All programs which do not understand that data will ignore it and recognize this file as a flat image, but editor which added that data going to recognize it and load as source file.

  2. 52 minutes ago, Mark Ingram said:

    What was your source file? I'm not sure you're comparing like-for-like here, as in the afdesign file we will store vector info (i.e. small), in PNG you've rasterised and flattened, and with TIFF you've rasterised each layer. Without seeing your source file, I would say those results look expected. 

    ok, it was not fair enough as long as one of my layers was a raster
    so here is a new test:
    huge but simple file (attached) with 8 2048x2048 artboards - total area 9488x4509  (this is close to a maximum than I ever going to need as GUI designer)

    afdesign with 500x500 preview:  39kb (yeah sure this is vector data it is tiny)
    tiff - no layers: 1076 kb
    tiff - with layers: 1085 kb (as expected only 9 kb of layer data )
    png - no layers: 613 kb (as expected way smaller than tiff)
    so if you supply a full-size preview PNG with layers data it is going to be 622 kb

    and my point here is that png is a better format than tiff for this purpose

    so 600kb for the full-size preview is awesome, I surely pay this 600kb to have a full-size preview,
    yes this is easy to compress file, but even with most complex image compressed png of that size should not be ridiculously huge

    test.afdesign

  3. 5 minutes ago, walt.farrell said:

    Perhaps, but you're also assuming the Affinity data would compress with the same efficiency as PNG data when using the PNG compression algorithms.

    no layers data compression completely unrelated thing to preview compression, it is possible to embed whatever you want into a PNG file, any ZIP, RAR, ARJ or whatever affinity uses for compressing layer data

  4. 7 minutes ago, walt.farrell said:

    TIFF supports compression, and Affinity supports multiple kinds of TIFF compression, found in the More... part of the Export dialog.

    yes TIFF supports ZIP and LZW both produce a worse result compared to PNG

    as an experiment, i've saved same file 3 times:
    afdesign with 500px preview - 735KB
    png without layers data - 707KB
    tiff with lzw compression and with layers - 1.6MB

    if png with layers was possible it would be less than 1.4MB (full-size png preview + affinity layers - 500px preview)

  5.  

    On 12/12/2019 at 2:29 PM, walt.farrell said:

    In a way, what you're asking for is already available. Instead of Saving a .afphoto file, you can Export a TIFF file with the Affinity layers saved. That does the same thing you've described, but using TIFF rather than PNG format.

    wow, didn't notice it before, maybe because export with "Save Affinity Layers" on is way more logical in "save as > TIFF" menu

    yes, this is it!
    the only thing is that PNG is way better-compressed format when TIFF files can get really huge PNG going to stay reasonably big

    "Save Affinity Layers" checkbox for PNG export (what is a synonym for "save as PNG") going to make me happy

     

     
     
     
     
    On 12/12/2019 at 8:34 PM, fde101 said:
    To a point...  the catch is that this would need to be set up for each file rather than something integrated into the document format itself.
    Maybe a "save documents with large previews" option in preferences wouldn't be too bad of a thing to offer, but I definitely wouldn't want a "full size" preview of large documents saved in every file...
    Meanwhile, this at least does exist.

    yes this is a good point, not always and not everyone needs a full-size preview
    but an option to configure preview size would be a great thing to have

     

    On 12/12/2019 at 4:22 PM, Mark Ingram said:

    I know. But they're also asking us to change our file format to be PNG with our data embedded within it. What we currently have is our data with an embedded PNG in it (for the preview).

    To be precise I was not asking to change or replace the affinity file format, I was proposing to add an option to save as "png with affinity layers"

  6. 1 hour ago, walt.farrell said:

    My Windows 10 system shows previews of Affinity files.

    Yes my as well, but those previews are limited to 500x500 pixels, way I suggest going to allow full-size previews

     
     
     
    1
    1 hour ago, fde101 said:

    The Affinity document format seems to be structured more like a database file than a traditional document structure, and that might not play nicely with a tagged format like the ones you suggest, as the files might be updated constantly while they are open, not just when you explicitly save the document.

    There is no need to change affinity file format structure, the only change is to add a wrapper
    this is like a Christmas gift wrapped in a colorful paper, from outside you see the nice package, but inside it can contain anything

    There is no need to regenerate high-res preview during work, only when the user explicitly asks to save a file.
     

  7. Affinity files have previews, those previews are limited to 512x512 what is, to tell the truth, is not enough, also those previews are not displayed by operation system by default.

    Some projects i'm working  on (UI-design) have hundreds of source files, and it is impractical to recognize those files only by filename or even lo-res preview :(

    I really love approach Macromedia took with Fireworks file format, they made it so source-data appended to a png image file
    all image viewers and file browsers recognize it as a picture and show high-resolution preview,
    but editor knows that besides preview there is a source-data, and when you open that png in editor it is actually a vector source file

    To remove confusion which png file is a flat raster image and which is a source file, extension suffix can be used kind of .af.png

    A bit of technical details:
    This is possible because of the patent-free nature of the PNG format, and it's chunk-based storage layer structure.
    Data in png file is stored in "Chunks", chunks declare themselves as critical or ancillary, and a program encountering an ancillary chunk that it does not understand can safely ignore it.
    So it is possible to put native affinity source file data into such chunk. Png serves as a container with nice cover image.

    And what is the best part of this approach is this is very simple to implement - you get the best support by all image viewers, by simply gluing 2 files together.

×
×
  • 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.