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

How can I reduce file size when adding noise?


Recommended Posts

Since saving an image as a png file applies lossless compression & added noise decreases the number of adjacent blocks of pixels that can efficiently be compressed into single-color blocks, an increase in the size of 'noisy' images saved as png files is unavoidable. 

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

Link to comment
Share on other sites

If I can get the file size down, then I could use any of these formats: svg, .eps, .ai, .png or .pdf

 

When saving in .svg or .eps, I think maybe there's something I could do in the export panel settings to help, but I'm not sure what. If I set raster dpi at 192, file size is still way too big. If I reduce the raster dpi to 72, then my file size is a more manageable 7.32MB.

 

So this seems to be what I need to look at. But how does changing the raster setting affect the file resolution?

 

I'm working with an image for DTG printing, and the recommendation from the printer is:

 

PNG-24 options at the top, make sure that Transparency is checked, and check the box for Convert to sRGB.

 

Thanks for your input. Much appreciated.

Link to comment
Share on other sites

After further experimentation, I can confirm, the issue is the raster dpi.

 

So, my main question is now: What impact does the raster dpi have on the overall image - I note that only 'some areas will be rastersied' - how can I determine which areas that will be?

Link to comment
Share on other sites

Well, it is only one recommendation of the printer and you want to reduce the size. The printer could rechange it if only one colour is used. Have you asked if a PDF test would be OK?

 

Another option: compressing.

Link to comment
Share on other sites

The dpi setting determines how many pixels the rasterized image will contain, so as you increase the dpi you increase the number of pixels in the image proportionally. That in turn increases file size.

 

Compression can decrease the file's size, but lossless compression is limited in that respect by how much similarity there is in the image's pixels -- higher levels of similarity can be compressed into a smaller number of bytes than lower levels. By "similarity" I mean either pixels blocks that are all the same color (as I previously mentioned in an attempt to avoid the complexities of the subject) or repeating patterns of pixels, even if they are different colors.

 

That's why adding noise increases file size -- the added noise decreases the number of same color blocks & of repeating patterns, thus decreasing the amount of lossless compression that can be achieved.

 

Since PNG (like JPEG) is a raster-only file format, everything will be rasterized if you export to it. SVG, EPS, PDF, etc. can contain both rasterized & vector objects so depending on the export preset used & the content of the file, either none, some, or all of the file will be rasterized.

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

Link to comment
Share on other sites

So I finally cracked it by rebuilding my design. It seems I had previously added noise in AP as filters. But in the rebuild in AD I used the colour panel.

This not only gives me the option to change the colour, which I somehow lost in my first build, it makes for much smaller files - 16.6MB for .png but only 12.7MB for .svg with raster dpi 200, 7.8MB for .eps.

 

These file sizes can be shrunk right down to under 2MB if I use the flatten preset.... so my next question is - should I flatten this or not when exporting the file?

Link to comment
Share on other sites

  • Staff

Hi TinPianoMan,

 

Can I first ask what physical size you are having the item printed at and what DPI your printer requires? There may be a simple solution to the problem. You should always just make the document at the actual size you intend to get it printed at and set the DPI to the requested value in the document setup - this way the output will always have just the right amount of pixel data when rasterisation is required.

 

As R C-R has stated, the problem is that by adding noise (which is a randomised gaussian noise) you are dramatically reducing the likelihood of the PNG compression being able to reduce the file size at all as it is a lossless format and you can't compress things that don't have some form of repetition or re-use (which a randomised gaussian noise is unlikely to have). Similarly, the SVG file you are making will also contain an embedded PNG so will suffer from the same problem (as there is no notion of 'noise' in SVG's format specification, so it will be sent out as a bitmap). If you ever see the file size drop dramatically you are probably either producing a lossy-compressed image (JPEG for example) or you are reducing the number of pixels in the output image.

 

Thanks in advance,

Matt

Link to comment
Share on other sites

Thanks so much for all the input here. It's been a big help and has made me rethink. I've decided adding noise is not the best effect for these designs, after all. It seems brushes will give me an alternative way to break up the solid colour without the complications of a noise filter.

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.