Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
graphics [2023/11/28 17:48] qcbs [Exercise 6 - Infographic!] |
graphics [2024/12/04 19:27] (current) qcbs [Exercise 5] |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Offered by Guillaume Larocque, Quebec Centre for Biodiversity Science. | Offered by Guillaume Larocque, Quebec Centre for Biodiversity Science. | ||
| - | + | Online. | |
| - | November 2023. Online. | + | |
| [[https://prezi.com/view/P9qA6oN11cCAwjay2Hml/|Link to Prezi presentation.]] | [[https://prezi.com/view/P9qA6oN11cCAwjay2Hml/|Link to Prezi presentation.]] | ||
| Line 33: | Line 32: | ||
| ==== Exercise 2 - Layers, cropping and manipulation of colors. ==== | ==== Exercise 2 - Layers, cropping and manipulation of colors. ==== | ||
| - | You are given the image of a leaf, and you have to add an animal of your choice from another photo on top of the leaf. | + | You are given the image of a plant, and you have to add an animal (or anything else) of your choice from another photo somewhere on the plant. |
| - | - Download this [[https://unsplash.com/photos/9Z1KRIfpBTM|image of a leaf]] and open it in GIMP. | + | - Download this [[https://unsplash.com/photos/green-leaf-plant-FV_PxCqgtwc|image of a plant]] and open it in GIMP. |
| - | - 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! | + | - 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 plant. 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&30|}}to delineate the outline of the animal you wish to extract. |
| - | - 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. | + | - 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 (normally on the right), 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. | + | - Make sure to clear the selection (Select>None). |
| + | - Using the Scale tool {{::scale_tool.png?nolink&30|}}, 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. You can also use the eraser tool for that. | - 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 plant in the layer menu and choose Add Alpha Channel. This will allow the layer to contain transparent parts. |
| - | - Click on the Fuzzy Select Tool {{::fuzy_select_tool.png?nolink|}}. Click on the background of the photo with the leaf. Adjust the threshold value in the Tool options and click again on the background until you include all of the background, but exclude the leaf. Click on DELETE to remove the background. | + | - Click on the Fuzzy Select Tool {{::fuzzy_select_tool.png?nolink&30|}}. Click on the background of the photo with the plant. Adjust the threshold value in the Tool options and click again on the background until you include all of the background, but exclude the leaf. Click on DELETE to remove the background. |
| - | - Go to unsplash or a site like [[http://www.wildtextures.com|wildtextures.com]] and download an image, texture or pattern to use as a background. | + | - Go to unsplash or a site like [[https://texturelabs.org|texturelabs.com]] and download an image, texture or pattern to use as a background. |
| - Download and open the texture in GIMP. Copy the image and click on Edit>Paste as>New layer. Click on the layer in the layer menu and drag it below the other layers. | - Download and open the texture in GIMP. Copy the image and click on Edit>Paste as>New layer. Click on the layer in the layer menu and drag it below the other layers. | ||
| - Adjust the colors of your background to your liking. | - Adjust the colors of your background to your liking. | ||
| + | - Add more features to the image or experiment with filters as you wish! | ||
| + | |||
| + | |||
| ==== Exercise 3 - Layer masks. ==== | ==== Exercise 3 - Layer masks. ==== | ||
| In this exercise, you will play with layer masks in GIMP. You will first select an element of an image and make the rest of the image black and white. You will then apply an effect know as "[[https://en.wikipedia.org/wiki/Tilt%E2%80%93shift_photography|tilt-shift]]" photography to your photo. This effect artificially plays with the depth-of-field of the image to make it look like only the central elements are in focus. This gives an overall impression that the whole image is very small, like a scale model. | In this exercise, you will play with layer masks in GIMP. You will first select an element of an image and make the rest of the image black and white. You will then apply an effect know as "[[https://en.wikipedia.org/wiki/Tilt%E2%80%93shift_photography|tilt-shift]]" photography to your photo. This effect artificially plays with the depth-of-field of the image to make it look like only the central elements are in focus. This gives an overall impression that the whole image is very small, like a scale model. | ||
| Line 86: | Line 89: | ||
| - | 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/|this site]] and download the version for your platform. If you are on Mac OSX, carefully read the extra steps needed. |
| ==== Exercise 5 ==== | ==== Exercise 5 ==== | ||
| Line 94: | Line 97: | ||
| {{::iiw_logo.png?direct&200|}} | {{::iiw_logo.png?direct&200|}} | ||
| - | - In Inkscape, click on File>Document Properties. Specify a width and height of 200 mm. Note that the background is transparent by default. To have a white background for the output image, click on Background color, and make the Alpha channel opacity (A) 100%. | + | - In Inkscape, click on File>Document Properties. Specify a width and height of 200 mm. |
| - Click on File>Import and choose the iiw_logo.png file from your computer. This will be used as a reference. You can make it bigger and place it beside the canvas. | - Click on File>Import and choose the iiw_logo.png file from your computer. This will be used as a reference. You can make it bigger and place it beside the canvas. | ||
| - Start by creating a square that fills most of the canvas. When done, click on the square and adjust the width W and height H on the top menu so that both values are equal. | - Start by creating a square that fills most of the canvas. When done, click on the square and adjust the width W and height H on the top menu so that both values are equal. | ||
| Line 116: | Line 119: | ||
| - Install the svglite package and the spocc package<file rsplus>install.packages('svglite') | - Install the svglite package and the spocc package<file rsplus>install.packages('svglite') | ||
| install.packages('spocc')</file> | install.packages('spocc')</file> | ||
| - | - Load the library. <file rsplus>library(svglite)</file> | + | - Load the library. <file rsplus>library(svglite) |
| + | library(spocc)</file> | ||
| - Execute the following code to create a pie chart, or adapt the code for another species or to use your own data. <file rsplus> | - Execute the following code to create a pie chart, or adapt the code for another species or to use your own data. <file rsplus> | ||
| df <- occ(query = 'Puma concolor', from = 'gbif',limit=10000) | df <- occ(query = 'Puma concolor', from = 'gbif',limit=10000) | ||
| Line 147: | Line 151: | ||
| - Click on the Create and edit text objects icon, and put a title for the infographic. | - Click on the Create and edit text objects icon, and put a title for the infographic. | ||
| - To add a small paragraph of text, click/drag to delineate where the section of text will be. This way, lines of text will wrap within that section. | - To add a small paragraph of text, click/drag to delineate where the section of text will be. This way, lines of text will wrap within that section. | ||
| - | - Choose a photo that you want to put at the centre of the diagram on EOL (http://eol.org) by searching with the name of the species. Save this photo to your computer and import in Inkscape with File>Import. | + | - Choose a photo that you want to put at the centre of the diagram on EOL (http://eol.org) or Wikimedia Commons (https://commons.wikimedia.org/wiki/Main_Page) by searching with the name of the species. Save this photo to your computer and import in Inkscape with File>Import. |
| - Resize approximately the image and click on the Create circles, ellipses and arcs icon. Click-drag on the photo to delineate the part of the photo that you want to put in the circle. You can put the circle semi-transparent (Fill, change Opacity) to make this easier. Then, select the photo and the circle by clicking and holding the SHIFT key. Click on Object>Clip>Set. This should crop the photo to a circle. You can release the clip at any time to undo this operation and get the complete photo back. | - Resize approximately the image and click on the Create circles, ellipses and arcs icon. Click-drag on the photo to delineate the part of the photo that you want to put in the circle. You can put the circle semi-transparent (Fill, change Opacity) to make this easier. Then, select the photo and the circle by clicking and holding the SHIFT key. Click on Object>Clip>Set. This should crop the photo to a circle. You can release the clip at any time to undo this operation and get the complete photo back. | ||
| - Download a silhouette of your animal, or this {{ ::cougar_silhouette.png?linkonly |Cougar silhouette}} and open it in Inkscape as a separate file. Click on the silhouette and Path>Trace bitmap. Choose Colors, specify 2 passes, and click on OK. You can then select the silhouette in vector format by clicking on it and copy-paste it on your infographic. Now, position it and choose a color. | - Download a silhouette of your animal, or this {{ ::cougar_silhouette.png?linkonly |Cougar silhouette}} and open it in Inkscape as a separate file. Click on the silhouette and Path>Trace bitmap. Choose Colors, specify 2 passes, and click on OK. You can then select the silhouette in vector format by clicking on it and copy-paste it on your infographic. Now, position it and choose a color. | ||
