# Differences

This shows you the differences between two versions of the page.

 graphics [2019/10/22 16:51]qcbs [Exercise 6 - Infographic!] graphics [2021/03/29 11:24] (current)qcbs [GIMP] 2021/03/29 11:24 qcbs [GIMP] 2021/03/29 11:24 qcbs [Inkscape] 2021/03/29 11:24 qcbs [Inkscape] 2021/03/29 11:23 qcbs [GIMP] 2021/03/29 11:23 qcbs [GIMP] 2021/03/29 11:21 qcbs [Exercise 4 - GIFs!] 2021/03/29 11:15 qcbs [Exercize 6 - Using the svglite package.] 2021/03/29 11:14 qcbs [Exercize 5 - Using the svglite package.] 2021/03/29 11:14 qcbs [Exercise 4] 2021/03/29 11:14 qcbs [Exercise 5 - GIFs!] 2021/03/29 11:14 qcbs [Exercise 3 - Layer masks.] 2021/03/29 11:13 qcbs [Exercise 7 - GIFs!] 2021/03/29 11:13 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/29 10:33 qcbs [Exercise 2 - Layers, cropping and manipulation of colors.] 2021/03/29 10:31 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/29 10:29 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/26 14:00 qcbs [GIMP] 2021/03/26 12:14 qcbs [Introduction to graphic design and image manipulation with open source tools] 2019/10/22 16:51 qcbs [Exercise 6 - Infographic!] 2019/10/22 16:51 qcbs [Exercise 6 - Infographic!] 2019/10/22 14:31 qcbs [Introduction to graphic design and image manipulation with open source tools] 2018/10/29 13:35 qcbs [Exercise 7 - GIFs!] 2018/10/26 11:39 qcbs [Exercize 5 - Using the svglite package.] 2018/10/26 11:39 qcbs [Exercise 5 - Editing R figures in Inkscape with svglite package.] 2018/10/26 10:38 qcbs [Exercice 6 - Infographique!] 2018/10/26 10:17 qcbs [Exercise 6 - GIFs!] 2018/10/26 10:16 qcbs [Exercice 6 - Infographique!] 2018/10/26 10:16 qcbs [Exercise 7 - Editing R figures in Inkscape with svglite package.] 2018/10/26 10:16 qcbs [Exercise 5] 2018/10/26 10:14 qcbs [Exercise 5] 2018/10/26 10:13 qcbs [Exercise 6] 2018/10/26 10:13 qcbs [Exercise 4 - GIFs!] 2018/10/26 10:11 qcbs [Introduction to graphic design and image manipulation with open source tools] 2018/03/01 10:20 qcbs 2018/02/27 11:26 qcbs 2017/10/30 16:41 qcbs [Exercise 6] 2017/10/30 16:39 qcbs [Exercise 5] 2017/10/30 16:36 qcbs [Exercise 5] 2017/10/30 16:34 qcbs [Exercise 5] 2017/10/27 16:53 qcbs [Exercise 7 - Editing R figures in Inkscape with svglite package.] 2017/10/27 16:53 qcbs [Exercise 7 - Editing R figures in Inkscape with svglite package.] 2017/10/27 16:46 qcbs [Exercise 6] 2017/10/26 16:27 qcbs [Introduction to graphic design and image manipulation with open source tools] 2017/10/26 11:57 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/29 11:24 qcbs [GIMP] 2021/03/29 11:24 qcbs [Inkscape] 2021/03/29 11:24 qcbs [Inkscape] 2021/03/29 11:23 qcbs [GIMP] 2021/03/29 11:23 qcbs [GIMP] 2021/03/29 11:21 qcbs [Exercise 4 - GIFs!] 2021/03/29 11:15 qcbs [Exercize 6 - Using the svglite package.] 2021/03/29 11:14 qcbs [Exercize 5 - Using the svglite package.] 2021/03/29 11:14 qcbs [Exercise 4] 2021/03/29 11:14 qcbs [Exercise 5 - GIFs!] 2021/03/29 11:14 qcbs [Exercise 3 - Layer masks.] 2021/03/29 11:13 qcbs [Exercise 7 - GIFs!] 2021/03/29 11:13 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/29 10:33 qcbs [Exercise 2 - Layers, cropping and manipulation of colors.] 2021/03/29 10:31 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/29 10:29 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2021/03/26 14:00 qcbs [GIMP] 2021/03/26 12:14 qcbs [Introduction to graphic design and image manipulation with open source tools] 2019/10/22 16:51 qcbs [Exercise 6 - Infographic!] 2019/10/22 16:51 qcbs [Exercise 6 - Infographic!] 2019/10/22 14:31 qcbs [Introduction to graphic design and image manipulation with open source tools] 2018/10/29 13:35 qcbs [Exercise 7 - GIFs!] 2018/10/26 11:39 qcbs [Exercize 5 - Using the svglite package.] 2018/10/26 11:39 qcbs [Exercise 5 - Editing R figures in Inkscape with svglite package.] 2018/10/26 10:38 qcbs [Exercice 6 - Infographique!] 2018/10/26 10:17 qcbs [Exercise 6 - GIFs!] 2018/10/26 10:16 qcbs [Exercice 6 - Infographique!] 2018/10/26 10:16 qcbs [Exercise 7 - Editing R figures in Inkscape with svglite package.] 2018/10/26 10:16 qcbs [Exercise 5] 2018/10/26 10:14 qcbs [Exercise 5] 2018/10/26 10:13 qcbs [Exercise 6] 2018/10/26 10:13 qcbs [Exercise 4 - GIFs!] 2018/10/26 10:11 qcbs [Introduction to graphic design and image manipulation with open source tools] 2018/03/01 10:20 qcbs 2018/02/27 11:26 qcbs 2017/10/30 16:41 qcbs [Exercise 6] 2017/10/30 16:39 qcbs [Exercise 5] 2017/10/30 16:36 qcbs [Exercise 5] 2017/10/30 16:34 qcbs [Exercise 5] 2017/10/27 16:53 qcbs [Exercise 7 - Editing R figures in Inkscape with svglite package.] 2017/10/27 16:53 qcbs [Exercise 7 - Editing R figures in Inkscape with svglite package.] 2017/10/27 16:46 qcbs [Exercise 6] 2017/10/26 16:27 qcbs [Introduction to graphic design and image manipulation with open source tools] 2017/10/26 11:57 qcbs [Exercise 1 - Basic image cropping, rotation and resizing.] 2017/10/25 16:54 qcbs [The R Magick package] 2017/10/25 16:54 qcbs [The R Magick package] 2017/10/25 15:36 qcbs [The R ImageMagick package] 2017/10/25 15:36 qcbs [Exercise 8 - Using the R ImageMagick package] 2017/10/25 15:35 qcbs [Exercise 8 - Using the R ImageMagick package] 2017/10/25 15:35 qcbs [Exercise 8 - Using the R ImageMagick package] 2017/10/25 15:30 qcbs [Exercise 8 - Using the R ImageMagick package] Line 3: Line 3: Offered by Guillaume Larocque, Quebec Centre for Biodiversity Science. ​ Offered by Guillaume Larocque, Quebec Centre for Biodiversity Science. ​ - October 23, 2019. McGill University. + March 29-30, 2021. Online. [[https://​prezi.com/​view/​P9qA6oN11cCAwjay2Hml/​|Link to Prezi presentation.]] [[https://​prezi.com/​view/​P9qA6oN11cCAwjay2Hml/​|Link to Prezi presentation.]] ===== GIMP ===== ===== GIMP ===== + + {{::​1200px-the_gimp_icon_-_gnome.svg.png?​200|}} To install GIMP, go to [[https://​www.gimp.org/​downloads/​|this site]] and follow instructions. ​ To install GIMP, go to [[https://​www.gimp.org/​downloads/​|this site]] and follow instructions. ​ Line 12: Line 14: To put GIMP in single window mode, click on Window>​Single Window Mode, and restart GIMP. To put GIMP in single window mode, click on Window>​Single Window Mode, and restart GIMP. + To put the Toolbox icons in color, go to Edit>​Preferences>​Interface>​Icon Theme> and choose Color. ​ ==== Exercise 1 - Basic image cropping, rotation and resizing. ==== ==== Exercise 1 - Basic image cropping, rotation and resizing. ==== Line 19: Line 22: - Open it in GIMP using File>​Open. - Open it in GIMP using File>​Open. - From the tools, click on the Rotate icon {{::​screenshot_from_2017-10-17_15-30-02.png?​nolink|}} and rotate the image so to make the road at the back approximately horizontal. ​ - From the tools, click on the Rotate icon {{::​screenshot_from_2017-10-17_15-30-02.png?​nolink|}} and rotate the image so to make the road at the back approximately horizontal. ​ - - Use the "Rectangle Select" {{::rectangle_select_tool.png?​nolink|}} ​tool to keep only the part of the image that contains the main protagonists. + - Use the "Crop tool" {{::auto_crop_tool.png?​nolink|}} to keep only the part of the image that contains the main protagonists. ​Press ENTER to validate the selection - - Click on Image>"​Crop ​to selection" to remove the non-selected portion of the image.  ​ + - Use the Colors>​Curve interface to make the dark areas of the image a bit darker, while making the other shades of the image untouched. Your curve should look like this: {{:​screenshot_from_2017-10-17_16-18-51.png?​direct&​200|}} - Use the Colors>​Curve interface to make the dark areas of the image a bit darker, while making the other shades of the image untouched. Your curve should look like this: {{:​screenshot_from_2017-10-17_16-18-51.png?​direct&​200|}} - Use the Clone tool {{::​clone_tool.png?​nolink|}} and the Healing tool {{::​healing_tool.png?​nolink|}} to remove small specks in the image. After clicking on the tool's icon, click on a reference area close to the speck you want to remove, and then click CTRL and click on the speck. Make sure that the brush size is appropriate. You can play with the opacity of a brush for a more subtle effect. ​ - Use the Clone tool {{::​clone_tool.png?​nolink|}} and the Healing tool {{::​healing_tool.png?​nolink|}} to remove small specks in the image. After clicking on the tool's icon, click on a reference area close to the speck you want to remove, and then click CTRL and click on the speck. Make sure that the brush size is appropriate. You can play with the opacity of a brush for a more subtle effect. ​ - Use Image>"​Scale image" and the "​Crop"​ tool {{::​auto_crop_tool.png?​nolink|}} with a fixed size to obtain an image that is exactly 120dpi (pixels per inch) at 8.5x11 inches. Use the Image>​Print size to verify that it works. ​ - Use Image>"​Scale image" and the "​Crop"​ tool {{::​auto_crop_tool.png?​nolink|}} with a fixed size to obtain an image that is exactly 120dpi (pixels per inch) at 8.5x11 inches. Use the Image>​Print size to verify that it works. ​ + EXTRA: ​ + - Convert the image to RGB by selecting Image>​Mode>​RGB. ​ + - You can try to colorize the hats on the picture by selecting them with the Free select tool, choosing a foreground color on the left, and using the bucket tool to click on the selected region. You will have to adjust the the threshold of the bucket to fill the whole region and the opacity so that we can see through the color making it look more realistic. ​ + - You can also give the image a sepia tone by choosing Color Balance, and moving the sliders towards the yellow and the red. ==== Exercise 2 - Layers, cropping and manipulation of colors. ==== ==== Exercise 2 - Layers, cropping and manipulation of colors. ==== Line 30: Line 36: - Download this [[https://​unsplash.com/​photos/​9Z1KRIfpBTM|image of a leaf]] and open it in GIMP. - Download this [[https://​unsplash.com/​photos/​9Z1KRIfpBTM|image of a leaf]] and open it in GIMP. - - Go to [[https://​unsplash.com|unsplash]] and download the photo of an animal of your choice. We will try to put that animal on the leaf. So choose something that works, but is original! ​ + - Go to [[https://​unsplash.com|unsplash]] and download the photo of an animal of your choice ​(or any photo with a subject of your choice). We will try to put that animal on the leaf. So choose something that works, but is original! ​ - Open the image you downloaded in GIMP. Use the Free select tool {{::​free_select_tool.png?​nolink|}} to delineate carefully the outline of the animal you wish to extract. At this point, you can just delineate the outside. - Open the image you downloaded in GIMP. Use the Free select tool {{::​free_select_tool.png?​nolink|}} to delineate carefully the outline of the animal you wish to extract. At this point, you can just delineate the outside. - - Click on Copy (CTRL-C) and then go to the GIMP page with the leaf and click on Edit>​Paste as>New layer. In the list of layers, double-click on the layer name (Should be "​clipboard"​) and change it to the name of your animal. ​ + - Click on Copy (CTRL-C) and then go to the GIMP page with the leaf and click on Edit>​Paste as>New layer in place. In the list of layers, double-click on the layer name (Should be "​clipboard"​) and change it to the name of your animal. ​ - Using the Scale tool {{::​scale_tool.png?​nolink|}},​ resize the layer and re-position over the leaf with the Move tool. - Using the Scale tool {{::​scale_tool.png?​nolink|}},​ resize the layer and re-position over the leaf with the Move tool. - - If there are parts of the animal that you would like to crop out (e.g. space between the legs), delineate it with the Free select tool and press DELETE to remove it. + - If there are parts of the animal that you would like to crop out (e.g. space between the legs), delineate it with the Free select tool and press DELETE to remove it. You can also use the eraser tool for that. - Click on the layer in the layer menu and then open Colors>"​Brightness,​ Contrast"​ to adjust the image so that it looks realistic on the leaf. Do the same with Colors>"​Hue,​ saturation"​. ​ - Click on the layer in the layer menu and then open Colors>"​Brightness,​ Contrast"​ to adjust the image so that it looks realistic on the leaf. Do the same with Colors>"​Hue,​ saturation"​. ​ - Right-click on the layer that contains the leaf in the layer menu and choose Add Alpha Channel. This will allow the layer to contain transparent parts. ​ - Right-click on the layer that contains the leaf in the layer menu and choose Add Alpha Channel. This will allow the layer to contain transparent parts. ​ Line 57: Line 63: - Repeat the operation with the other duplicate of the image for the top part. Start by applying the Gaussian blur and then add the mask and apply the gradient from the center to the top third of the image. ​ - Repeat the operation with the other duplicate of the image for the top part. Start by applying the Gaussian blur and then add the mask and apply the gradient from the center to the top third of the image. ​ - Your image should now be blurry on the top and bottom and should have the tilt-shift look. What happens if you now make the mask from step 1 visible? What if you change their order? ​ - Your image should now be blurry on the top and bottom and should have the tilt-shift look. What happens if you now make the mask from step 1 visible? What if you change their order? ​ + + ==== Exercise 4 - GIFs! ==== + + You will be making a GIF animation that highlights how cool your research is! + + * Find some photos or graphs from your research that you want to highlight. ​ + * In GIMP, click on File>New and select a 640x480 document with a White background. ​ + * Open the content you want to put in the animation in GIMP and copy it as new layers using Edit>​Paste as...>​New layer. Resize the content to fit into the page using the Scale Tool. + * Reorder the layers, knowing that the bottom layer will be played first and the top layer last. + * Change the name of each layer to designate the associated content. After the name of the layer add (500ms) to get something like: "First photo(500ms)"​. The number in parenthesis is the duration of this slide in the GIF animation. ​ + * For slides with text, click on the Text tool and choose the font and font size from the Tool options before adding the text. When you are done placing and resizing the text, add (500ms) to the name of the text layer. ​ + * To give a background to your text, first choose a foreground color by clicking on the Foreground and Background Color icon. Then, add an empty layer to the bottom of the text (by clicking the Create a new layer icon {{::​add_layer_icon.png?​nolink|}}) that has that foreground color. When satisfied with both the text and the background, right click on the text layer and choose Merge Down. The text is now fused with the background and you can't remove it. + * You can test your animation by clicking on Filters>​Animation>​Playback. ​ + * When you are happy with your work, choose File>​Export as>GIF Image, and then click on As animation, leaving the other options unmodified. If it asks if you want to crop, click yes. + * You can now open your animation in a web browser! ​ + ===== Inkscape ===== ===== Inkscape ===== + + {{::​1200px-inkscape_logo.svg.png?​200|}} + + To install Inkscape, go to [[https://​inkscape.org/​en/​release/​0.92.2/​|this site]] and download the version for your platform. If you are on Mac OSX, carefully read the extra steps needed. ​ To install Inkscape, go to [[https://​inkscape.org/​en/​release/​0.92.2/​|this site]] and download the version for your platform. If you are on Mac OSX, carefully read the extra steps needed. ​ - ==== Exercise ​4 ==== + ==== Exercise ​5 ==== Line 85: Line 111: - Export your logo as a PNG image by clicking on File>​Export PNG image. Click on Export area "​Page"​ and then select a size of 500x500px. ​ - Export your logo as a PNG image by clicking on File>​Export PNG image. Click on Export area "​Page"​ and then select a size of 500x500px. ​ - ==== Exercize ​5 - Using the svglite package.==== + ==== Exercize ​6 - Using the svglite package.==== If you are unable to do this exercize, you can download the {{ ::fig1.svg |SVG File here}} If you are unable to do this exercize, you can download the {{ ::fig1.svg |SVG File here}} Line 105: Line 131: - If you are curious, your can open this SVG file in Notepad or TextEdit to check the structure of the SVG/XML file. You could modify the file in text form if you wanted. ​ - If you are curious, your can open this SVG file in Notepad or TextEdit to check the structure of the SVG/XML file. You could modify the file in text form if you wanted. ​ - Note that the text created with svglite has a fixed width (textLength is specified in the xml text tag. So, if you increase the size of the font, it will become higher but not wider. To fix this problem, open the XML Editor (Edit>​XML Editor) and clear the textLength section for text objects. You could also make this change by editing the SVG in a text editor. ​ - Note that the text created with svglite has a fixed width (textLength is specified in the xml text tag. So, if you increase the size of the font, it will become higher but not wider. To fix this problem, open the XML Editor (Edit>​XML Editor) and clear the textLength section for text objects. You could also make this change by editing the SVG in a text editor. ​ - - Note that you could also save your file in pdf format and open it in Inkscape as a PDF. It will still be a vector file, but it may be easier to use in some cases than the SVG format. + - **Note that you could also save your file in pdf format and open it in Inkscape as a PDF. It will still be a vector file, but it may be easier to use in some cases than the SVG format.**  pdf("​fig1.pdf"​) pdf("​fig1.pdf"​) pie(country_count$Freq,​labels=country_count$Var1) pie(country_count$Freq,​labels=country_count$Var1) Line 125: Line 151: - Here is an example of a {{::​cougar_infographique.png?​linkonly|completed infographic}}. ​ - Here is an example of a {{::​cougar_infographique.png?​linkonly|completed infographic}}. ​ - - - ==== Exercise 7 - GIFs! ==== - - You will be making a GIF animation that highlights how cool your research is! - - * Find some photos or graphs from your research that you want to highlight, or use the infographic you created above. ​ - * In GIMP, click on File>New and select a 640x480 document with a White background. ​ - * Open the content you want to put in the animation in GIMP and copy it as new layers using Edit>​Paste as...>​New layer. Resize the content to fit into the page using the Scale Tool. - * Reorder the layers, knowing that the bottom layer will be played first and the top layer last. - * Change the name of each layer to designate the associated content. After the name of the layer add (500ms) to get something like: "First photo(500ms)"​. The number in parenthesis is the duration of this slide in the GIF animation. ​ - * For slides with text, click on the Text tool and choose the font and font size from the Tool options before adding the text. When you are done placing and resizing the text, add (500ms) to the name of the text layer. ​ - * To give a background to your text, first choose a foreground color by clicking on the Foreground and Background Color icon. Then, add an empty layer to the bottom of the text (by clicking the Create a new layer icon {{::​add_layer_icon.png?​nolink|}}) that has that foreground color. When satisfied with both the text and the background, right click on the text layer and choose Merge Down. The text is now fused with the background and you can't remove it. - * You can test your animation by clicking on Filters>​Animate>​Playback. ​ - * When you are happy with your work, choose File>​Export as>GIF Image, and then click on As animation, leaving the other options unmodified. If it asks if you want to crop, click yes. - * You can now open your animation in a web browser! ​