Jump to content
Al Grasso

AD png and jpg exports very poor

Recommended Posts

I exported a vector drawing in AD for Mac in png format and the resultant resolution was very poor. I also tried in jpg mode and it was equally poor. Exported as a pdf the file resolution was good. The resultant file was around 600KB whereas the png file was around 50KB.

I then looked into DrawPlus and noticed that the export functions available in that program were far superior to the current AD. The png format could be exported in 1-4-8-24-32-48-68-CMYH and MONO bit depths.

Why is it so poor and useless in AD for Mac?

 

Share this post


Link to post
Share on other sites

What resolution (pixel dimensions) were you exporting the vector drawing to from Affinity Designer? Vectors are resolution independent but raster image formats like PNG & JPEG are not, so the results you get will depend on how many pixels you tell AD to use to create the exported file.


Affinity Photo 1.9.1, Affinity Designer 1.9.1, Affinity Publisher 1.9.1;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.9.1.225 & Affinity Designer 1.9.1 (showing 1.9.7) for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 14.4 (18D52)

Share this post


Link to post
Share on other sites

No, I don't agree. Both PNG and JPEG exports are fine.

In the advanced options (there's a button for that which seems to be missed by many) in the export dialog, you can set the PNG to export in other bits depth (plus, one option to keep the bit depth in which whatever the scene file is atm ). Just saying is "poor" (I am seeing a pattern of this in recent days) is so abstract, so undefined, that every time I read this , I really wonder about the real purpose...

In any case, it can be a workflow issue. When going from vectors to pixels, common to every package.

PNG exported in CMYK  ?


AD, AP and APub.  Ryzen 9 3900X, 32 GB RAM, GTX 1650 4GB, 500GB m.2 SSD, 1TB HDD 7200rpm. Wacom Intuos 4 XL.

Share this post


Link to post
Share on other sites

I would agree that for specific purposes the PNG export could be much improved, but let's get down to Earth: no general-purpose image editor can beat specialized treatment via a dedicated image optimization tool such as Color Quantizer, and nor should that be an issue. If that level of control is required, the user will have access to that level of knowledge as well.

Affinity's PNG export is fine compared to, for example, Photoshop. Photoshop doesn't even have a palletized option available to it compared to Affinity.

As for JPG: not sure. Didn't do enough testing myself, but then again, I tend to stay away from jpg nowadays for my work, excepting the odd web dev job. Otherwise I'll just use either heavily optimized PNG or Webp files.

And now that I mentioned Webp: i find it quite concerning that Affinity won't let me export to Webp. It's a great format for game and mobile development (I guess on Windows and Linux at least, because Apple seems to boycott the file format), and to me it's a crying shame a modern image editor like Photo won't support it. Worse, it DOES import Webp file, but won't allow me to save the same file as Webp? Silly. And very short-sighted, in my opinion. As short-sighted as Adobe in this case. Luckily PhotoLine has no such problem, and exports via its visual web export to Webp.

 

Share this post


Link to post
Share on other sites

PS one thing Affinity's export persona should do, is a real-time preview. Come on, guys! Without a preview it's trial and error.

Anyway, one of the major peeves I have with Photo at the moment, and why I just export to full quality PNG before processing further in other image editors and optimization tools. I just don't bother with Photo's export persona because of this.

Share this post


Link to post
Share on other sites

I do not agree that my post was generic or poor in details. I gave a comparison that the vector diagram exported to pdf resulted in a file of 600 KB. This is a relatively large file for a pdf containing 95% of vector entities. The png export at 24 bit, the default depth, resulted in a file of just 50 KB. This is far too low and my expectation was that it should have been more in the 200 KB range. Indeed when I exported the same vector diagram in eps and then open this eps file in Pixelmator and re-exported in png the quality of the resultant new png export was significantly better than the AD export and the file size was around 160 KB.

As to the ADVANCE button I could not find one, see screenshot attachment 1. I did see a button with the inscription MORE (screenshot2) and that provided different options for export depth or compression but in png format the choice was still limited to 8 and 24. The same depth I referred to before; and I had used 24 bit previously when the resulting file was 50 KB as mentioned previously.

I could not post the original vector diagram as it is confidential for now. Instead I provided the resulting byte size of the exported file as I thought those in the know would understand the implication of exporting a file that in pdf is 600 KB and in png is barely 50 kB. In ay event to get a quality png export I had to resort to using a lower grade program than AD. I never experienced this problem with DrawPlus before. Hence, I was quire surprised. I am still having to export vector files from AD in eps and then convert then to png using another program. 

The screenshot below shows a file size of 151 KB but the file I opened for this message is a different one from the one I refer to in this message.

Screen Shot 1.png

Screen Shot 2.png

Share this post


Link to post
Share on other sites
27 minutes ago, Al Grasso said:

I could not post the original vector diagram as it is confidential for now.

Can you replicate your issue with something that is not confidential? If so, you could post that and the community members could try to help.

Otherwise, if you trust the Serif staff, they can provide a private upload link for you to use that might let you upload the confidential file in a way that only they can see.


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.9.1.979 and 1.9.1.979 Beta   / Affinity Designer 1.9.1.979 and 1.9.1.971 Beta  / Affinity Publisher 1.9.1.979 and 1.9.1.967 Beta

Share this post


Link to post
Share on other sites

Comparing a PDF with a PNG is like comparing apples and oranges. If the vector file is very complex, it will create a large PDF file (because the vectors remain vector, and all the original path data is retained) and a 800x800px PNG file could result in a very small file size. But it all depends on the complexity of the original file.

You should not base any file size assumptions on such basis. It makes no sense.

Are you exporting the PNG file at the same pixel size? What is the pixel size? Is it 800x800px? Are the PNG files you exported from Affinity and the lower grade tool you mentioned equal pixel size? Are they both 24bit?

Share this post


Link to post
Share on other sites
37 minutes ago, Al Grasso said:

I did see a button with the inscription MORE (screenshot2) and that provided different options for export depth or compression but in png format the choice was still limited to 8 and 24.

In that "More" dropdown for PNG exports, there are several Resampler options. The default is "Bilinear," but you also have a choice of several others. Try one of the "Lanczos" ones to see if you like the results better.


Affinity Photo 1.9.1, Affinity Designer 1.9.1, Affinity Publisher 1.9.1;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.9.1.225 & Affinity Designer 1.9.1 (showing 1.9.7) for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 14.4 (18D52)

Share this post


Link to post
Share on other sites

@haakoo PDF retains all the vectors, and this would blow the file up (depending on the complexity of the graphic), so it should never be compared to a bitmap file format such as PNG. It's just not useful in any way. And depending on the settings, a non-compressed bitmap may be saved in a PDF as well. Too many variables at work there for reliable comparisons.

Comparing the SVG output to a PNG output would be more practical, since depending on the graphic it would yield lower file sizes for one or the other format, and also SVG is obviously resolution independent for web page and app development. An informed decision can then be made which file to use.

By the way, 300dpi tells us nothing: 1 pixel can be saved as 300 dpi, and it is merely a parameter used in print to decide how a pixel should be treated when printed.

Always mention pixel dimensions when comparing.

 

Share this post


Link to post
Share on other sites

 

What makes me surprised is the png loss of quality mentioned by you, as PNG is indeed by definition, lossless, unless (well and there are some lossy filters, but you would need to use those on purpose, and not all exporters use those these days) one uses PNG-8 (extremely different to a PNG made in 8 bits) which is mostly like a gif, 256 colors limited. Other than that, a PNG24 (can have 16 million of colors) should show equally in every software, at least if color profiles were handled well.

The "poor" quality comment about PNG, keeps not detailing in which way you do notice a poorer export. Is it in loss of detail ? the lines? That totally could be related to Medical Officer Bones comment. Just exporting it at low resolution, it is going to loose all the detail. Maybe your DrawPlus is exporting by default, or previous export, in higher res ? (been eons since last time I used Drawplus)

We don't know if it is that, or it getting blurry, a color problem...Can you make a vector file of same size in AD, with a bunch of vector objects, same effects if possible, please, just random stuff that wont take more than 2 minutes in making, and export from AD the png, and the PDF vector file, then import as EPS in your other app, export again in PNG and PDF ?

I mean, if you really want to solve this, if that is the purpose of the thread, I would be shockingly surprised if we all don't get to hunt the issue , pretty fast. And then you probably get to have a richer and easier workflow. Drawplus was and is a really good application, but AD plays in another league, much better.  (it means also the transition of a nice lil app, a bit for more hobby usage, to a more pro solution. )

BTW, related to size.... things are sometimes more complex than one would think..... PNG compression algorithms are really good to make a large canvas of a vector file becoming really small. It does not do it at a quality loss cost, as would do a JPEG. The PNG algos, when detect large areas of a flat color, usual in a vector file, they can compress all that "same-color" area in a crazily great ratio. So, for starters, that does not surprise me at all. If anything, one could say that then AD is making a much better job in the export optimization. But, the size difference you are reporting in the PNG export between Drawplus and AD,  together with the quality loss you are seeing, is telling me that almost is certain that the size, resolution of the file is being dramatically different, and then, you would not be comparing two apps' export functions, just how different is to export in small or large resolution. Maybe is some hidden setting in one of the two apps. Again, the 4 files upload (test files, unrelated to that actual project), I'm positive would lead us to immediately detect the problem.

There are a ton of settings in a PDF export, specially in pro packages like these. Also,  as we don't have access to your files, or,  a sample fast-made file with a bunch of similar elements, then we don't know if you are adding raster effects, if you are rasterizing in export and you don't know it, etc, etc.  IE, in the PDF it could be applying zip compression for images, but not n the other, or resampling all images to 100 dpi, and not in the other, or using PDF 1.4 in one, and a PDF/X in the other, ....


AD, AP and APub.  Ryzen 9 3900X, 32 GB RAM, GTX 1650 4GB, 500GB m.2 SSD, 1TB HDD 7200rpm. Wacom Intuos 4 XL.

Share this post


Link to post
Share on other sites

@haakoo Ah, right, sorry about that.

SrPx is correct: too many unknown variables at work here, and until we have an actual sample file that demonstrates the problem unequivocally, nothing can be solved or anything useful stated.

I did a quick comparison between Affinity Photo, Photoshop, and PhotoLine, and 24bit exports are pretty much similar in export size and quality, barring the included meta data. With Color Quantizer I obviously am able to achieve smaller file sizes at 24bit, as it is a specialized PNG optimization tool, but no surprising results.

When I saved as 8bit palettized files, I was a bit surprised to see that Affinity Photo did not reach the same low file size as the other two, though. A rather large discrepancy which I can't explain yet, so I will investigate further.

Share this post


Link to post
Share on other sites
9 minutes ago, SrPx said:

What makes me surprised is the png loss of quality mentioned by you, as PNG is indeed by definition, lossless...

While PNG uses lossless image compression, that does not mean exporting a document to the PNG format is in any meaningful sense "lossless." For one thing, it is a "flat" (single layer) raster image format, so everything in the document must be flattened into a single raster image, including everything in any vector, text, pixel, etc. layers it might have. Among other things, this makes the choice of resampling method critical in achieving good results.

Since no two documents are exactly alike or will necessarily be exported with the same scale factor, there is no "one size fits all" choice for this.


Affinity Photo 1.9.1, Affinity Designer 1.9.1, Affinity Publisher 1.9.1;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.9.1.225 & Affinity Designer 1.9.1 (showing 1.9.7) for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 14.4 (18D52)

Share this post


Link to post
Share on other sites
Quote

When I saved as 8bit palettized files, I was a bit surprised to see that Affinity Photo did not reach the same low file size as the other two, though. A rather large discrepancy which I can't explain yet, so I will investigate further.

Usually, the larger differences between palettized files, besides the more obvious one, which is , the exact number of colors (irfanview can tell you the exact number of colors of any png exported, or any other image (i key) , ie, 6.327 actual real colors in a PNG 24, etc.) , which is number one size factor in a PNG due to how its algos work, but another that people tend to not be aware of, is ...error diffusion. Is not an "error", is a dithering method usually called so. It might be working internally by default, even if there would not be any user controllable setting in an UI of any specific software application. It makes sense if in your test, you see smaller palettized PNGs (PNG-8) in AD than AP. APhoto is a photo/image editor, a raster image editor largely focused in photography editing, so, is logical if it is defaulting (I dunno, tho) to use error diffusion, which is a "casual" dithering mode that makes you harder to see any pattern at all (kindda random dithering). Other methods are patterned based, kind of mechanical patterns, easier to spot, of several types (usually lighter in memory size of the exported file) , but also, there's the possibility of a forced banding method (zero dithering), maybe is made default in AD, and that makes total sense, too. You will want your large flat ink color area of a vector design to not show ANY dithering at all. Banding might only happening in the lines, in a PMNG export from these designs, but there you wont notice until zooming crazily. The funny thing about this is that difference in size can be HUGE (between error diffusion, a uniform pattern, or pure banding), specially in big canvases files, between dithering types, and no dithering at all. The organized, uniform pattern types seem to be easier than error diffusion on getting smaller sizes to PNG algos, while the champion there is no dither at all.  Also, MAYBE (my knowledge comes from some eons handling many other apps, not that I reached that level of granularity in tests with AD/AP, yet, other than constantly checking stuff is working) the AD 8 bit export is probably using by default limited palettes, eliminating colors that  it does not need. This alone can mean a huge, huge difference in export size.

Really, is very rare to see any issue these days in PNGs / JPGs exports...They are basically using standard libraries in each OS which a ton of apps do use, and these formats been around a while among us... they're polished as heck. Of course, there can be issues. There are surely issues indeed , like in every software. But we need to quickly discard things that might be happening due to factors quite far from being a software bug. (Again, you never know, though) 

 


AD, AP and APub.  Ryzen 9 3900X, 32 GB RAM, GTX 1650 4GB, 500GB m.2 SSD, 1TB HDD 7200rpm. Wacom Intuos 4 XL.

Share this post


Link to post
Share on other sites
18 minutes ago, R C-R said:

While PNG uses lossless image compression, that does not mean exporting a document to the PNG format is in any meaningful sense "lossless." For one thing, it is a "flat" (single layer) raster image format, so everything in the document must be flattened into a single raster image, including everything in any vector, text, pixel, etc. layers it might have. Among other things, this makes the choice of resampling method critical in achieving good results.

Since no two documents are exactly alike or will necessarily be exported with the same scale factor, there is no "one size fits all" choice for this.

Oh, in the old times, lossless (specially for the web, where IMO has been most massively used) was applied to what you see as a result (ie, if you'd flattened the full scene, preserving  the same visual quality .I know what you mean, a vector is infinitely sharp, raster will pixelate at some zoom level...But I am referring to what is usually applied to compare between lossy raster image "exports" to those that don't introduce those artifacts ). Of course, most exports do loose editability and a bunch of features when they are not exported as the native file.  Is also as I am speaking mostly in the sense we "raster people" typically handled the concept. For a lot of us, a raster export in a vector app was kind of less common (my usual workflow would be indeed a vector export, and raster exports in raster apps). Thus, the less common situation to be considered (today is not at all so, indeed, back in the day few people would use vectors to make 32x32 icons...today is quite common to do so for the sake of speed and workflows. Am a pixel pusher, a pixel artist. I can't stand that, lol..... ). Also quite a lot of this goes in the line that what most clients and companies did worry about, was the level of quality lost in JPEGs or GIF/PNG-8, exports again, mostly in web output.


AD, AP and APub.  Ryzen 9 3900X, 32 GB RAM, GTX 1650 4GB, 500GB m.2 SSD, 1TB HDD 7200rpm. Wacom Intuos 4 XL.

Share this post


Link to post
Share on other sites

Here is a better example of PNG export comparison issues popping up when comparing the PNG output of these applications.

P_Dinosaurs.svg

I exported this SVG file in Photo, Photoshop, and PhotoLine as a 'pure' 24bit PNG file @ 800x720px.

Result:

Photo: 396kb

Photoshop: 286kb

PhotoLine: 423kb

You'd think "Well, Photoshop is the clear winner!", right?

Not so fast. As it turns out, Photoshop's version contains 2063 unique colours, while Photo has 3829 colours, and PhotoLine's version tops out at 4285 colours. So that means PhotoLine's version arguably retains the most fidelity (or uses softer anti-aliasing), but in practice the user won't be able to discern any visual differences between these three versions.

All of these were saved as 24bit +alpha, so why the large differences? Depends on the algorithm each app uses to decide which colours to keep, and which to throw away. I have no idea. No clue. Up to the developers. If we'd be discussing a source bitmap the differences would probably be negligible. But in this case a vector file is to be processed, and each image editor's built-in conversion routines will have an impact on the final conversion.

In short, "losless" loses its meaning when dealing with vector file conversion. It depends on the software used and the routines at work.

The compression/processing algorithm can have a tremendous impact on final file size on top of that first vector to bitmap conversion. That same 4285 colours version was reduced to 281kb after processing it with Color Quantizer, and saving it as true color. CQ will create a palettized version of 4285 colours, resulting in no quality loss, yet a significantly smaller file size while maintaining more colours than either the Photo or Photoshop version. It's all about the compression and processing stage at this point.

@SrPx Indeed, dithering may have a large impact on palettized images too. in this case I refrained from converting to a 8bit version, because it will open a whole new can of worms, in particular seeing that so many different dithering patterns may be used. A regular pattern compresses better than a stochastic one.

The results can be inspected down below. I didn't check for meta data, but I turned it off for all, I believe. Visually no-one will be able to see the difference.

Affinity:

P_Dinosaurs_affin.png.5154e1a2904e0fea756ba0e70bd2bd1d.png

Photoshop:

P_Dinosaurs_ps.png.c0c266e48c1c308ea966fbcc91817db0.png

 

PhotoLine:

P_Dinosaurs_PL.png.1e7237f9b225ad8898a1931ad83f0789.png

 

Color Quantizer based on PhotoLine's high-colour version:

P_Dinosaurs_cq.png.3ffeaa29cb4fea568c9f9b8dd5b394fa.png

Share this post


Link to post
Share on other sites
2 minutes ago, SrPx said:

<snip> Thus, the less common situation to be considered. <snip>

Well old man (which I say with no disrespect intended because I am one too), these days the most common situation is working with a hybrid graphics app that supports multi-layer documents that can include a mix of vectors, bitmaps (or raster images, if you prefer), advanced text features, a plethora of blend modes, & more.

Unavoidably, that means to export from one of them & get good results, it is imperative to understand the implications of each export option they offer & to use them intelligently, guided by that knowledge. Just "winging it" won't cut it anymore.


Affinity Photo 1.9.1, Affinity Designer 1.9.1, Affinity Publisher 1.9.1;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.9.1.225 & Affinity Designer 1.9.1 (showing 1.9.7) for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 14.4 (18D52)

Share this post


Link to post
Share on other sites
18 minutes ago, R C-R said:

Well old man

46..... but old soul, anyway....  :D 

Don't worry, you sound really young to me.... actually, younger.  :) 


AD, AP and APub.  Ryzen 9 3900X, 32 GB RAM, GTX 1650 4GB, 500GB m.2 SSD, 1TB HDD 7200rpm. Wacom Intuos 4 XL.

Share this post


Link to post
Share on other sites

Wow, I did not intend to cause so much work and frustration to all concerned. I yielded to your request and changed the name in the file to enable me to upload it. I attach three files.

1- Map for test.png is exported from AD using the standard default PNG-24 bilinear.

2- Map for test.eps is exported from AD using Raster DPI 300px Postscript 3, again an almost default export except for the choice of DPI which was selected by me at 300 DPI.

3- Map for test exported from Graphics.png was generated after importing the eps file (2) into Graphics and then re-exporting the same file into png format at DPI 144.

Results:

Export 2 is poor. In analogue terms the high frequencies have been cut off and whereas the original file in AD is beautifully crisp ( I use an iMac 5K retina) the resulting png file is far inferior.

Export 3, compared to 2 is far superior in high resolution, which translated into the frequency domain means the high frequency loss effect is negligible.

Incidentally, taking a screen shot from the document area in AD results in a Mac png file that is far superior to the equivalent export in png from AD (i.e. 2). See Screenshot1.png.

Finally, to prove that the eps file imported into Graphics was of high quality I took another screenshot on my iMac and I attach it as Screenshot 2.png.

I hope now you have enough information to help you understand that my original comment was rather justified. 

Please ensure you view the attached files in Retina display, at least 4K, else the comparison will not be effective.

I look forward to your comments.

Map for Test.png

Map for Test.eps

Map for Test Exported from Graphics.png

Screen Shot 1.png

Screen Shot 2.png

Share this post


Link to post
Share on other sites

All four PNG files have vastly different resolutions! The first one is 800x800 (no transparency), the second one is twice as high at 1600x1600 and has a transparent background, the third one (Graphics) is 2416x2414px without transparency... Nothing can be compared here.

They all look good to me on a white background, but obviously the second AD version looks not as crisp as the third one, since that third one was exported at a much higher resolution. And the second one (AD with a transparent background) might not look as good DUE to the transparency when viewed interpolated zoomed out. Depends on the viewing software (in my experience some viewing software doesn't do transparency justice in regards to quality). So be sure to export with a white background.

Viewing the second one at the same scale as the third one on a retina screen will result in a more blurred version in the case of #2, of course. Not a fair comparison either.

Here is your eps file exported from Affinity Photo at 2416x2416px. I really can't notice any difference compared with your #3. Affinity's version is also smaller in file size.

Are you sure you have a firm grasp of the concepts of DPI, print size and (true) pixel resolution, and how these relate to each-other? I mean this in the best way, so if you do, forget I asked.

Anyway, DPI is completely irrelevant in this discussion: only pixels count. You MUST export all variants from all applications at IDENTICAL pixel resolutions (and I do NOT mean DPI!).

1046546461_MapforTestaffinity.thumb.png.870e341810d57948ea5a6731e4a6bc83.png

Share this post


Link to post
Share on other sites

PS I get the best anti-aliasing quality at 2416x2416px when I export the initial 3333px version as a PNG and scale it down to 2416px using Catmul-Rom in Color Quantizer. Most software will not allow for Catmul-Rom as a downsampling algorithm, though. The file size is increased which is a sign of more (useful) information, which is again a sign of that particular downsampling algorithm preserving details better than a straight vector to bitmap conversion at 2416px.

In particular the red lines of Tomas Road look much less jagged, and details stand out more (check the red dot at "such and such is located here").

577949839_maptestcq.thumb.png.7ede171270f3512d88f222716e5ce711.png

Share this post


Link to post
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

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.