SurvivalManual icon indicating copy to clipboard operation
SurvivalManual copied to clipboard

Optimise all images

Open georgebutter opened this issue 7 years ago • 19 comments

👋 Hello everyone, I'm new to this repo, and hardly know a thing of java or android development but would like to be of assistance. I saw on the info that you need an illustrator that can make small assets. I can losslessly (it's actually a word) reduce the file size of all the existing images. Would be handy if someone can tell me the best place to get started (finding the assets that need replacing and such) and let me know how I can fit in with your workflow is it just best if I edit on the wiki? 👍 Cheers.

georgebutter avatar Aug 14 '17 13:08 georgebutter

#5 - Extract the annotations from the images Was wondering whether we could use the svgs as code so that we can keep the text within the image and still use translation strings?

georgebutter avatar Aug 14 '17 13:08 georgebutter

I made an svg with embedded text of this image: https://raw.githubusercontent.com/wiki/ligi/SurvivalManual/fig04-01.png - taken from the medicine part of the wiki. I don't think that .md, or at least github supports .svg.

Here's the svg code, it's around the same file size as the .png it was created from but has the benefits of being scalable and has the text embedded so that it could potentially be part of the image and translated.

With text - 7kb

<svg xmlns="http://www.w3.org/2000/svg" width="361" height="135"> <path d="M135.5 11c-5.4 6.2-11 12-12 12.7-2.7 1.7-4.8 1-10.3-3.8-4.6-4.3-7-4-9 1-1.6 4.2-2.2 4.5-5 2.7-2.4-1.4-5.2-.4-6 2.2-.2 1-.8 2-1.3 2-2 0-6.7-2.7-8-4.5-1.8-2-2-2-5.5-.2-2.4 1-4.7 1.5-6.6 1-2.7-.5-3-1-2.5-3 .3-1.3.2-2.4-.4-2.4-.4 0-1.2 1-1.6 2.6-.3 1.5-2 4.2-3.6 6-1.7 2-3 4.4-3 5.6-.3 14-1.7 19-6.4 23-3.7 3-6 3-12.8-.2-4.3-2-9-3.3-14.5-4-4.5-.5-9.6-1.7-11.3-2.5-4-2-5.3-1-2 1.6 3.4 3 11.6 7 13.5 7 3.7 0 .8 2-7 4.5-8 2.7-10.2 2.8-15 1-.8-.3-1.5-.2-1.5.2 0 .5 2.4 2 5.3 3.7 5.3 2.6 14 10 14 11.6 0 1.8-8.3 4-15.5 4-4 0-7.5.4-7.5 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2.5-2.8 6.8-4.7 9.6-3.5 5.3-3.3 7.5.2 2.4 3.3-4.6 7.8-16.2 6.3-16.2-.2 0-1 2-1.6 4.3zm5.2 2.5c-1 2.7-2.2 5.4-2.8 6-.6 1-.6 1.3 0 1.3.7 0 2.3-2.4 3.7-5.4 3-6 3-6.6 1.7-6.6-.2 0-1.4 2-2.4 4.7zm-37.2-1c-4.7 2.6-5.3 3.4-2.5 2.6 1.8-.4 8.2-5.2 7.2-5.3-.3 0-2.4 1.2-4.7 2.6zm8.7 1.3c-.6 1.3-1 2.4-.7 2.7.3.3 1-.5 1.7-1.7.6-1.2 1-2.3.8-2.5-.2-.2-1 .5-1.7 1.6zm-50.5 1.4c-2.2 1-2.5 1.4-1.4 1.8 1 .3 2.3.3 3 0 .6-.5 3.6 0 6.6 1 6.8 2.3 19.5 3.6 19.5 2 0-.8-2-1.2-5-1.2-5 0-16.3-2.5-18.4-4-.5-.5-2.3-.3-4 .4z"/> <path d="M90.4 117.4c1 1 2.4 1.6 3 1.6 1.2 0 .7-.5-2.4-2-2.4-1-2.4-1-.6.4zm42.2.3c-.4.5-2.6 1.6-5 2.5-3.2 1.3-3.6 1.7-1.7 1.7 2 0 9-3.6 9-4.7 0-.7-1.7-.5-2.5.3zm16.4 4.5c-5 5.2-5.4 6-1 2.8 2.5-1.8 6.6-7 5.8-7.3-.2 0-2.4 2-5 4.5zm-42 1.8c3 1.2 8 2.3 11 2.5 4.6.4 3.8 0-4.5-2-12-3-14-3-6.5-.4zm21.5 3l-5 .7h5.2c2.8.2 5.5-.2 5.8-.7.3-.6.3-1-.2-.8l-5.8.8z"/> <text font-family="Helvetica" font-size="12"> <tspan x="204" y="16">Grasp the angles of the lower</tspan> <tspan x="204" y="30">jaw and lift with both hands,</tspan> <tspan x="204" y="44">one on each side, moving the</tspan> <tspan x="204" y="58">jaw forward.</tspan> <tspan x="204" y="86">If victim’s lips are closed, </tspan> <tspan x="204" y="100">open the lower lip with</tspan> <tspan x="204" y="114">your thumb.</tspan> </text> </svg>

This one without the text is about 1kb smaller and is scalable.

<svg xmlns="http://www.w3.org/2000/svg" width="81" height="59"> <path fill="#000" fill-rule="nonzero" d="M59 4.6C61.4 2 63.4 0 63.5 0c.3.3-2.4 3.5-6.5 7.8-4 4.4-5.8 5-11.6 5.4-3.7 0-4.8 0-6.2-.6-1-.4-2-.6-2.7-.4-.8 0-1.2 0-1.4-.6-.2-.7-.2-.7-.8 0-1 1.5-.8 2 1.2 3.3 1.6 1 2 1 3.7.6 1-.3 2-.3 2.2 0l-1.5.5c-1 .2-2 .7-2.7 1.2-.5.5-1 1-1.3 1-.2 0-.4.2-.5.7 0 .3-.5.7-1 .7-.2 0-1 .4-1.8 1-1.2.8-1.3 1-1 2 .2.6.2 1 0 1-.3 0-.6-.4-.7-1-.3-.8-.4-.7-1.6.7-.6.8-1 1.7-1 2 0 1.7 2 2.2 3.8 1 .4-.3.4-.6 0-1.3-.3-.5-.3-.8 0-.8s.6.3.7.6c.4 1 1.2.8 2.4-.4.4-.6 1-1 1-1 .2.3-.2 1-1 1.7-1.2 1.4-1.2 1.4-.4 2.7.8 1.4.2 1.8-.7.4-.8-.8-.8-.7-2.6 1.6-2 2.6-2 3-1 4.3 1 1.2 2 .8 5.3-2.6l3-3c0 .4-1.2 2-2.8 3.6-3.8 4-3.8 5.7 0 5.7 1.7 0 2 0 1.7-.8 0-.6.5-1.6 2.4-3.4 1.5-1.5 2.7-2.4 2.7-2.2 0 .3-.6 1-1.4 1.8-1.5 1.4-3 4-3 5.3 0 2 3.8 1 5.7-1.4.5-.5 1-1 1.4-1l4-1.8c4.2-2 8-5.3 10.5-9 1-1.5 2-2.6 3.3-3.2l2.7-1.7 2.2-1.5c1.2-.7 1.2-.7-.2.6-1 .7-2.6 2-4 2.7-1.3 1-2.7 2.2-3.6 3.5-3.3 4.8-7.2 8-11.7 9.8-1.8.6-3.6 1.6-4 2.3-2.4 2.6-5.4 3.5-6.4 1.8-.4-.6-1-.8-2.3-.8-1.8 0-3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2.2-1.7 1.3-.2-1 .8-1.2 1.7-3 2-4.2zm2.3 1c.5-1 1-2 1.2-2 .6 0 .6.3-.7 3C72 51 71.2 52 71 52c-.4 0-.4 0 0-.5 0-.3.7-1.4 1-2.6zm-16-.4l2-1c.4 0-2.4 2-3.2 2.2-1.2.3-1 0 1-1.2zm3.7.7c.3-.4.7-.7.8-.6 0 0 0 .5-.4 1 0 .6-.5 1-.6.8 0 0 0-.6.3-1zm-22 .6c.7-.3 1.5-.4 1.7-.2 1 .7 5.8 1.8 8 1.8 1.4 0 2.3.2 2.3.5 0 .7-5.6 0-8.5-1-1.3-.3-2.6-.5-3-.3h-1c-.6-.2-.5-.4.5-.8zm1.7 1.3c-.8-.7-.8-.7.2-.2 1.4.6 1.6.8 1 .8-.2 0-.7-.3-1.2-.7zm18.4 0c.3-.3 1-.4 1 0s-3 2-4 2c-.8 0-.6-.3.8-.8l2.2-1zm7 2c1.2-1 2-2 2.2-2 .4.2-1.4 2.5-2.5 3.2-2 1.4-1.8 1 .4-1.2zm-18.2 1c-3.2-1.3-2.4-1.2 2.8 0 3.7 1 4 1 2 1l-4.8-1zm9.4 1l2.5-.2c.2 0 .2 0 0 .3 0 .3-1.2.5-2.4.5H54L56 55z"/> </svg>

georgebutter avatar Aug 14 '17 15:08 georgebutter

This is very cool - thanks so much. Will have to look into this deeper tonight (just looked into it in the lunch break now) - ideally I can convert these into Vector Drawables (https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88) - but unfortunately the first attempt failed - VectorDrawables are a subset of SVG's - sometimes one can convert things - but this SVG also looks really simple - no much features needed. But as I said - will look later today - thanks so much - love this initiative!

ligi avatar Aug 15 '17 12:08 ligi

Update - now it works - even the default svg - not sure what went wrong the first time - very great!

selection_138

ligi avatar Aug 15 '17 12:08 ligi

That's great news! So is it preferable to store the text in the SVG as an annotation or is that an unnecessary complication?

georgebutter avatar Aug 15 '17 13:08 georgebutter

:tada: :clap: YAY - Ideally without text: VectorDrawables do not support text and it also makes things easier with translations.. Also with VectorDrawables I can easily support day/night mode. In this example we can easily put the text below I think and the meaning is not lost. But there are some places where text annotates certain places in the image - was just thinking about just painting numbers there and then in the text reference these numbers - what do you think? Also please add yourself to the contributors page in the wiki! You don't know how much this helps the project - as it also enables the last translation blocker I had ;-)

ligi avatar Aug 15 '17 14:08 ligi

I think that sounds like a swell idea! Is there a directory on this repo I can use to push the svgs to?

georgebutter avatar Aug 16 '17 12:08 georgebutter

Not yet - you can make one in /assets/content_svg_orig

ligi avatar Aug 16 '17 13:08 ligi

  • JPG : for pictures of animals, one can use jpegoptim (to losslessly save some space) in .jpg files;
  • PGN : Google also provides a zopfli algorithm to losslessly re-compress .png files;
  • GIF : For drawings (especially b&w), I think that .gif format will achieve interesting performances.

Siltaar avatar Aug 21 '17 21:08 Siltaar

Important to know we cannot use PGN and GIF - but using jpegoptim for the jpegs is a good idea!

ligi avatar Aug 22 '17 17:08 ligi

@ButsAndCats added you to credits - let me know if you want something changed: https://github.com/ligi/SurvivalManual/wiki/Credits/_compare/500279e29b2df85f9c41f742d899b6392f2d7400...d90dd58318d68093d12991a32a704ff13b48bdc8

ligi avatar Aug 26 '17 19:08 ligi

Technically a bit stuck here currently: https://stackoverflow.com/q/45699184/322642 - would have a workaround - but this is quite ugly ..-)

ligi avatar Aug 26 '17 20:08 ligi

Much nicer device-2017-08-26-225425

ligi avatar Aug 26 '17 20:08 ligi

To simplify the conversion of the illustrations to SVG Potrace could be used together with what is explained here. In some cases the traits of the illustrations are not well defined but in general lines the results of the conversion are quite decent. The only problem is that it has no OCR so the text remains as a set of paths and has to be added by hand with an editor like Inkscape or CorelDraw. I leave attached a couple of images with which I perform this procedure as a proof of concept: test images.zip

@ligi But there are some places where text annotates certain places in the image - was just thinking about just painting numbers there and then in the text reference these numbers - what do you think?

Another option could be to convert the text into a path and leave written somewhere how to convert it back to text at the moment of making corrections or translations (at least in Inkscape the process is reversible).

aaferrari avatar Aug 05 '18 09:08 aaferrari

From #77 :

https://inkscape.org/doc/tutorials/tracing/tutorial-tracing.html

https://wikihow.com/Trace-an-Image-Using-Inkscape

Inkscape provides an open source GUI for Potrace.

westurner avatar Feb 20 '19 02:02 westurner

I appreciate this initiative and would like every image (unless it's a photo) to be a vector

inferno986return avatar Apr 14 '20 19:04 inferno986return

Yea I would like this too - and there seems to be movement upstream recently: https://issuetracker.google.com/issues/62435069 maybe we are getting there ;-)

ligi avatar Apr 14 '20 19:04 ligi

SVG allows to use text, and the switch tag in javascript can select a text depending on the language used by the browser settings (I think that Java should work in a similar way). I suppose that I was removed from translation group, because they don't plan to include new translations. Very sorry.

h8nor avatar May 28 '20 23:05 h8nor

How to switch the SVG in Dark Mode: https://catalin.red/svg-favicon-light-dark-theme

h8nor avatar Jul 24 '23 13:07 h8nor