Jump to content

Recommended Posts

Posted

I have a TIF file that I export to a resized color gif image and the quality gets drastically reduced no matter what settings I tinker with.

I am first removing the white background from the TIF image (for viewing online with various backgrounds). If I leave the white background, the export as GIF works as expected.

I tried exporting as PNG to compare and it looks great, but I need gif.

Exporting it as GIF makes the image deteriorate to the point it cannot be used.  I have attached the original, the exported GIF, and an exported PNG.

To clarify, I am wanting a decent quality color GIF image when I export. I have tried this on both PC and Mac desktop versions (most current updates). Any idea on how to make this function properly?

KC01WIN18C.TIF

KC01WIN18C.gif

KC01WIN18C.png

Posted

The problem you are having is because GIF does not support semi-transparent pixels, so as described in the "Can parts of GIF be made semi-transparent?" section of this article, there can be no antialiasing to blend edges with contrasting background colors. So while you can remove most of the white background easily, there will still be aliased edges something like below unless you remove so much of the edges of the lettering that you erase too much if it.

545166822_savingmoney.jpg.62ac1880648a4bbcd675528b4f4b1dda.jpg

KC01WIN18C.afphoto

 

All 3 1.10.8, & all 3 V2.5.7 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

Posted

The best way to tackle this kind of scenario is to isolate the line drawing and redo the text on a transparent background. You’ll still get a poorer result with GIF than with PNG, for the reason @R C-R explained, but the text will generally remain legible.

saving-money.gif

saving-money.afphoto

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)

Posted

Since GIF does not support partially transparent pixels, even when you redo the text like @αℓƒяє∂ suggested, you can sometimes end up with letters that are thinner than you might like. A relatively easy way to thicken them up a bit is to use Affinity Photo's Select > Alpha Range > Partially Transparent menu item to select each of the rasterized text layers in turn, invert the selection, grow it by 1 px, & use the Paint brush Tool set to the text color to make those pixels 100% opaque.

I included the history in saving-money, thicken letters.afphoto, which may make it a bit easier to see how this works.

448725706_saving-moneycomparison.jpg.24559b7f5fba2d2c190cc3752d0b6ca2.jpg

All 3 1.10.8, & all 3 V2.5.7 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

Posted
2 minutes ago, R C-R said:

Since GIF does not support partially transparent pixels, even when you redo the text like @αℓƒяє∂ suggested, you can sometimes end up with letters that are thinner than you might like. A relatively easy way to thicken them up a bit is to use Affinity Photo's Select > Alpha Range > Partially Transparent menu item to select each of the rasterized text layers in turn, invert the selection, grow it by 1 px, & use the Paint brush Tool set to the text color to make those pixels 100% opaque.

I thickened up the words ‘SAVING MONEY’ (to match the original as closely as possible, given that there is no Bold style in the font family) by applying a thin stroke to the text.

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)

Posted

@MikeW, is that a transparent GIF?

All 3 1.10.8, & all 3 V2.5.7 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

Posted

Thanks for the info. I am bummed. I'm not the creator of the clipart originals, just processing the originals for putting online.

Was trying to get away from Photoshop, looks like I won't be able to. Somehow Photoshop lets me remove backgrounds and save as GIF's without severe degradation. Not sure how they do it, but it is a feature I have become reliant on.

Too bad, I am really liking Affinity Photo, but I have a workflow I do 4 times per year for several dozen graphics for the past 15+ years. I'm either going to get an old version to work on my Mac or suck it up and pay them a monthly fee. :(

Posted

 

Considering the premise that you flatten, merge your layers, background (considering you have a white background layer. If you have another color as the expected, web background will not be white, but other color, then just adapt trick 1 to this other color) , provided you set first that background layer as white (or whatever the target color) and figure, inside AP (or PS or etc, I am explaining it in an almost non package specific way), there's several ways to deal with this problem, which was extremely common some decades ago, in web, and in games (pixel art games) :

Trick 1 : If you know the target background is going to be always the same exact color, ie, pure white, then something that would work is exporting the "almost white" pixels attached to it, with it. If going to be loaded always exactly over white (255,255,255) it will look, that is, the lines and borders,  visually just as if was a PNG, smooth contours. If you would load it over any other background color in whatever your web section, even an "almost white" tone, color, the jagged edges and a bunch of "sand grains" , white-ish (or whatever the expected fixed bg color) pixels attached would show up, of course. 

How to do that, technically, well, selecting with magic wand with the settings of zero tolerance (0) and with no antialiasing, will select in the background all what is pure white (255,255,255 in RGB mode) and then you delete it, all that selection content .(selected as "contiguous", or would delete as well white that is inside the cartoon, like the eyes' or teeth's white). It makes a really ugly border over any non white background (you can check putting a layer  below in AP, and change the layer's hue and brightness to see the effect). In a so controlled situation where you know the BG is always white, or always any other color ( as procedure is almost identical) then no probs. For this trick, you don't need to manually edit / paint individual pixels with Pixel Tool, unlike in the other options ("tricks") below, where you do need it.

Of course, this makes the most horrid jagged and dirty contour, but over a fixed background color that you expected, no one is ever going to know/notice. The gif displays the cartoon as smooth as a PNG24 or PNG32 or etc. (PNG8 is like a gif in that issue)

Note whatever the fixed bg color, if white or whatever, you surely want to have a test layer below of that color, so that you can double check that your messed up border will never be noticed visually, not even slightly, and make the cartoon contour ink lines show up perfect once loaded over the target background.  Do not embed a color profile in the GIF (some tools do without asking...tho not sure it was only possible with PNGs, never with gifs, now I don't remember) as can lead to an almost white instead of white (or whatever the base color), if there's a profiles mismatch with the browser's colors (rarely if you would use and work on sRGB). Happened a lot n the old IE, one way to handle was ensuring no profile was embedded, or use an external utility (ie, TweakPNG for the PNGs) to remove the embedded profile from file header. 

Trick 2 : If the background is going to change, and not to a fixed color (so, not in an expected, controlled way) always the same, you could do the trick 1 method, but add some final steps : After removing the full white (255, 255, 255), you add a layer below with in a middle grey. A fully filled layer . Ideally a grey of similar value of the value of the colors you expect to have there, if you at least know ALWAYS is gonna be a dark tone, or a mid value, or a light value, whatever the color. If not even knowing that, just use mid gray (128,128,128). Then you first get ride of the "almost white pixels" or almost whatever color tones (. Some might be even hard to differentiate but the magic wand to zero tolerance with no antialiasing, will tell you . If you have not a single clue about what the background (/s) color is (/are) going to be, you can just set the antialiased pixels as middle grey. So basically you are converting semitransparent pixels to a middle (or light or dark, as explained above) grey, full opaque pixel, by using the PIXEL TOOL, not the regular brush . Now, you could set the layer below in dark tone, or light tone, if you at least know it will be only over dark (or mid/light) colors. Or if will be only over white colors. Is important, as then, the middle grey tones, you made them darker instead of middle (when you know that ALWAYS is a dark tone, whatever the color), or lighter instead of middle, depending on if the backgrounds are going to be dark, or light backgrounds, respectively. With quite some effort, it can look at least just not terrible. In some cases, with good expertise, it might look quite well. All this individual pixel retouch, I would only recommend doing them with Pixel Tool in AP, or the Pencil tool in PS. Or any similar "hard edges" brush in whatever the app.

Trick 3 : Embrace the old school pixel art aesthetic for this one, and make the border pure pixel art. But...then for style coherence, you should make (or have someone paid to do that) all the cartoon(s) in pixel art style. There were no smooth borders or half transparent pixel in those games and graphics of those years. It takes knowledge of how to do pixel art, but if you know how to, or know someone that can, this would be another option. The aesthetic is coming back, in the big movement of indy games (as came back before in the first cell phone games, still in a lot of them) and in design, as a kind of modern style (just as 3D low polygon count y triangles meshes also were kind of a thing till recently in new 2D design trends. Not sure if still they both are) that aims to emulate partially the retro graphics touch/feel.

Reminder: All pixel editing, highly recommended to be do with the Pixel Tool, not the regular brush.

Trick #1 is the closer to what you were after, but depends on you knowing if the background is going to be always white, or whatever the color (you can do the trick 1 with any color in a layer below, the procedure is the same, just those would be not almost-white tones, but almost-whatever full color, instead. Procedure is identical)

Now... if the thing is not being animated, I don't get why would you need a gif (even if it is, today there are other technical options), instead of just a PNG. Maybe is a site's restriction.

Knowing the target background, or even not so, one can (well, I can...hehe)  make a quite seamless output, never as shown in the disappearing pixels sample you posted.

Today, you could show animation through advanced CSS techniques, HTML5, or using APNG (small size, almost fully supported) or MNG (almost unsupported on browsers). But both formats have had bad luck despite being way more advanced, even worse when for multiple circumstances, animated GIFs are having a strong come back. One of the MANY reasons is that still Edge and older IE can't load APNG (that browser been a pain for web designer for decades). IMO, one can't loose large chunks of audience due to a file format. 

Lastly, you could very well do this toons in vectors and export as SVG. SVG is much better supported today. I'd just avoid filter and gaussian blur and stuff, as well as text over a path. I'd personally do as you do when exporting  "safe" EPSs, just convert text to outlines (or at least, don't export text following a path), all filters you have, convert them to normal gradients. It has teh advantage of better responsive design adaptation. You could probably export directly from AD, these SVGs, although I have not tried (can always export to Inskscape, export from there the svg , if find some incompatibility with browsers). Obviously, with vectors the whole aliased border issue is non existent. In some old machines, tho, the load of a svg, specially if complex, could be slowly processed/opened in the browser, while a gif loads at light speed....Also, in very old machines, OSes and browsers, SVG files DO find issues.

This is all about a general format matter, not something specifically happening or not in Affinity. But thought I'd share some info / tricks.

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted

OooOoopppss...

I started that tiny post after lunch, then forgot, then got back and finish, was only aware of one first reply from R C-R

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted
2 minutes ago, MikeW said:

Why would that be?

Possibly he does it for some of those Christmas sites providing gifs only for greetings or whatever. Or for some stock site requiring gifs, etc. (reason is almost always because it loads everywhere....)

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted

BTW, PS did NOT provide (so, beware that matter of getting an old version...as it depends....) that trick for many years, most of its time, it's just avoiding you to have certain know-how about what's really happening there, but I like to control things a bit more...

Is an extremely small/unimportant reason to discard or not an entire package, also....  ;)

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted
30 minutes ago, Hurley said:

Thanks for the info. I am bummed. I'm not the creator of the clipart originals, just processing the originals for putting online.

Was trying to get away from Photoshop, looks like I won't be able to. Somehow Photoshop lets me remove backgrounds and save as GIF's without severe degradation. Not sure how they do it, but it is a feature I have become reliant on.

Too bad, I am really liking Affinity Photo, but I have a workflow I do 4 times per year for several dozen graphics for the past 15+ years. I'm either going to get an old version to work on my Mac or suck it up and pay them a monthly fee. :(

Definitely...Maybe it's me only, but I would *not* pay a subscription for sth I'd do 4 times a year.....There are tons of specialized free tools to even not only do this, but in an automated way. Heck, or pay a someone to do it for you.... I'm very sure it will be way cheaper than paying a subscription. Like, pay someone who has a subscription, 4 times a year, just exporting, will be cheap, as it gets the output  you seem to prefer out of the box, so is not a lot of man/woman hours for whoever (-->cheap)... Or pay someone knowing how to deal with that properly with whatever the tool, Affinity or not.  Again, surely much cheaper....

(hehe... I'd just do the clipart myself, mine is waaay better (and that being extremely humble) than that sample purchased, hehehee,  if I was in that problem...surely reusing characters, objects, everything from year to year. have my flexible collection ready for whatever. Way more efficient. And if has to be that style.... in vectors, probably (or just full transparent BGs, is easy to export good gifs so). Then exporting to gif or whatever easily, as wouldn't be smashed to a background).

Or even easier, just dig for a stock site that provides clipart with transparent backgrounds... or already being cured gifs. There must be tons of them.   :)  (this would be the fastest and cheapest option)

 

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted
3 hours ago, MikeW said:

This is the GIF at 240% view.

Viewed in what app? When I open the file in a new tab in Safari, or download it to my Mac, I don't see any checkered background at any zoom level. It looks something like this at higher zoom levels:
128581761_Giffromdownload@3x.jpg.66c21dbd65b017114bb8dab6c8ed1b93.jpg

@Hurley: any chance you could upload one of the old Photoshop GIFs (or just a section of it) that looks good & has a transparent background?

All 3 1.10.8, & all 3 V2.5.7 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

Posted

The version I uploaded had a background layer I filled with red just to show it on a background color.

I opened the gift in a viewer that had a transparency grid for the screen shot. 

Posted
2 hours ago, R C-R said:

128581761_Giffromdownload@3x.jpg.66c21dbd65b017114bb8dab6c8ed1b93.jpg

@Hurley: any chance you could upload one of the old Photoshop GIFs (or just a section of it) that looks good & has a transparent background?

the kid's face seems to have suffered an error diffusion filter in some export, at some point...That can be avoided. The original tiff does not show it.

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted
12 minutes ago, SrPx said:

the kid's face seems to have suffered an error diffusion filter in some export, at some point...That can be avoided. The original tiff does not show it.

My guess is that is because @MikeW created the version of the GIF he uploaded with a reduced color palette.

All 3 1.10.8, & all 3 V2.5.7 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

Posted

Yep, was just a side curiosity/comment ...with  the utilities I used to use back in the day... one could set diffusion error, uniform patterns, or nothing of that, meaning, controlling well what one was doing (number of colors, custom palette, etc) to avoid hard banding, my fav was almost always "no filter", no dithering. Unrelated, tho.

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

Posted
9 hours ago, SrPx said:

Unrelated, tho

Except Photo dithers always when palette does not have enough colours. You cannot reduce colours and posterise the image.

Posted

Touché. Yep...Indeed, I have not gone into depths in this sort of thing in AP.... is many years since I dealt with this or palette based stuff...I worked during a (intense, or borderline crazy) year at a company making mobile games when games in the mobile were a novelty...In that one is where I handled it more. The indexed mode... Palettes allow making crazy things in pixel art. Specially if count on ur side with a colleague who is a freakin' legend of the game making pioneers of my country (and the world), and the man can code an entire universe in C and C++.   Dunno, for this sort of stuff I'd use other apps.... (and if for games, just aseprite and tilestudio...)

Of course, has its uses yet, (a specialized tool would always beat both PS and AP in this... is sth that should be always considered) but imo, extremely far of the relevance ( if saving a gif in a certain way has yet any) of other lacks or, the thing that worries me more improving/fixing the current features.

 

AD, AP and APub V2.5.x. Windows 10 and Windows 11. 
 

 

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.