Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
graphics [2024/12/03 15:17]
qcbs [Exercise 2 - Layers, cropping and manipulation of colors.]
graphics [2024/12/04 19:27] (current)
qcbs [Exercise 5]
Line 36: Line 36:
   - Download this [[https://​unsplash.com/​photos/​green-leaf-plant-FV_PxCqgtwc|image of a plant]] 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 plant. 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&​30|}} to delineate the outline of the animal you wish to extract. Adjust the threshold value in the Tool Options dialog (normally on the left), and click within the plant+  - 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 (normally on the right), 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. ​
   - Make sure to clear the selection (Select>​None). ​   - Make sure to clear the selection (Select>​None). ​
Line 44: Line 44:
   - 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. ​   - 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 {{::​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. ​   - 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.
Line 97: 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 119: 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 150: 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. ​