<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Photography - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Photography - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Fri, 26 Jun 2026 17:32:31 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/photography/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Convert HEIC to JPG on Windows – HEIC File Format on PC ]]>
                </title>
                <description>
                    <![CDATA[ The HEIC photo format is Apple’s proprietary version of the HEIF (High-Efficiency Image File) file format.  It’s a better way to save photos than JPG and JPEG, because with it, you can save up to 50% disk space on your device without losing quality. ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/convert-heic-to-jpg-on-windows-heic-file-format-on-pc/</link>
                <guid isPermaLink="false">66adf08e3bf50764799b9ca3</guid>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Windows ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Thu, 23 Sep 2021 21:29:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/09/heic.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The HEIC photo format is Apple’s proprietary version of the HEIF (High-Efficiency Image File) file format. </p>
<p>It’s a better way to save photos than JPG and JPEG, because with it, you can save up to 50% disk space on your device without losing quality. </p>
<p>Because HEIC is owned by Apple, photos taken with the latest macOS versions and iOS 11 upward are saved in the .heic format. But it's not readily available on other devices such as Windows and Android. </p>
<p>So, in this article, I will show you how to convert HEIC files to JPG on a Windows machine.</p>
<h2 id="heading-how-to-convert-heic-to-jpg-on-windows">How to Convert HEIC to JPG on Windows</h2>
<p><strong>Step 1</strong>: To convert HIEC to JPG on Windows, head over to Microsoft store and search for “HEIC to JPG (FREE)”. It lets you convert 10 HEIC files to JPG in a day.</p>
<p><strong>Step 2</strong>: Click on the first app that appears in the search results, then “GET” on the next page, and install it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/heic-converter.jpg" alt="heic-converter" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/get-heic-converter.jpg" alt="get-heic-converter" width="600" height="400" loading="lazy"></p>
<p>Launch the app after installing it and you should see an interface like the one below: </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/heic-to-jpg.png" alt="heic-to-jpg" width="600" height="400" loading="lazy"></p>
<p><strong>Step 3</strong>: To convert any image in the HEIC format to JPG, simply drag and drop the image into the app, or copy and paste it, and the image will be converted immediately:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/convert-to-heic.gif" alt="convert-to-heic" width="600" height="400" loading="lazy"></p>
<p>To view the files converted, head over to Pictures and you should see a folder named “HEIC to JPG Conversions”. In there, you will see all images converted with the app.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/09/view-heic.gif" alt="view-heic" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article, you learned how to convert HEIC files to JPG on Windows, so you can start viewing the files on your Windows machines. </p>
<p>If you found this article helpful, kindly share with your friends and loved ones.</p>
<p>Thank you for reading, and have a nice time.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Android Camera2 – How to Use the Camera2 API to Take Photos and Videos ]]>
                </title>
                <description>
                    <![CDATA[ We all use the camera on our phones and we use it a l-o-t. There are even some applications that have integrated the camera as a feature.  On one end, there is a standard way of interacting with the camera. On the other, there is a way to customize ]]>
                </description>
                <link>https://www.freecodecamp.org/news/android-camera2-api-take-photos-and-videos/</link>
                <guid isPermaLink="false">66ba4fd343a51af2a76f7563</guid>
                
                    <category>
                        <![CDATA[ Android ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ video ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tomer ]]>
                </dc:creator>
                <pubDate>Thu, 29 Jul 2021 22:36:44 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/07/0_0d3MvPnozsSTafWk.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>We all use the camera on our phones and we use it a l-o-t. There are even some applications that have integrated the camera as a feature. </p>
<p>On one end, there is a standard way of interacting with the camera. On the other, there is a way to customize your interaction with the camera. This distinction is an important one to make. And that’s where Camera2 comes in.</p>
<h2 id="heading-what-is-camera2">What is Camera2?</h2>
<p>While it has been available since API level 21, the Camera2 API has got to be one of the more complex pieces of architecture developers have to deal with. </p>
<p>This API and its predecessor were put in place so developers could harness the power of interacting with the camera inside of their applications. </p>
<p>Similar to how there is a way to interact with the microphone or the volume of the device, the Camera2 API gives you the tools to interact with the device's camera. </p>
<p>In general, if you want to user the Camera2 API, it would probably be for more than just taking a picture or recording a video. This is because the API lets you have in depth control of the camera by exposing various classes that will need to be configured per specific device.</p>
<p>Even if you've dealt with the camera previously, it is such a drastic change from the former camera API, that you might as well forget all that you know. </p>
<p>There are a ton of resources out there that try to showcase how to use this API directly, but some of them may be outdated and some don’t present the whole picture. </p>
<p>So, instead of trying to fill in the missing pieces by yourself, this article will (hopefully) be your one stop shop for interacting with the Camera2 API.</p>
<h2 id="heading-camera2-use-cases">Camera2 Use Cases</h2>
<p>Before we dive into anything, it is important to understand that if you only want to use the camera to take a picture or to record a video, you do not need to bother yourself with the Camera2 API. </p>
<p>The primary reason to use the Camera2 API is if your application requires some custom interaction with the camera or its functionality. </p>
<p>If you are interested in doing the former instead of the latter, I'll suggest that you visit the following documentation from Google:</p>
<ol>
<li><a target="_blank" href="https://developer.android.com/training/camera/photobasics">Take Photos</a></li>
<li><a target="_blank" href="https://developer.android.com/training/camera/videobasics">Capture Video</a></li>
</ol>
<p>There you will find all the necessary steps you need to take to capture great photos and videos with your camera. But in this article, the main focus will be on how to use Camera2.</p>
<p>Now, there are some things we need to add to our manifest file:</p>
<p>Camera permissions:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">uses-permission</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.permission.CAMERA"</span> /&gt;</span>
</code></pre>
<p>Camera feature:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">uses-feature</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.hardware.camera"</span> /&gt;</span>
</code></pre>
<p>You will have to deal with checking if the camera permission has been granted or not, but since this topic has been covered widely, we won’t be dealing with that in this article.</p>
<h2 id="heading-how-to-set-up-the-camera2-api-components">How to Set up the Camera2 API Components</h2>
<p>The Camera2 API introduces several new interfaces and classes. Let’s break down each of them so we can better understand how to use them.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/1_nPqyLhTqxaqRytV8lV41VA.png" alt="Image" width="600" height="400" loading="lazy">
<em>Look at all those components</em></p>
<p>First off, we’ll start with the <a target="_blank" href="https://developer.android.com/reference/android/view/TextureView">TextureView</a>.</p>
<h3 id="heading-camera2-textureview-component">Camera2 TextureView Component</h3>
<p>A TextureView is a UI component that you use to display a content stream (think video). We need to use a TextureView to display the feed from the camera, whether it's a preview or before taking the picture/video. </p>
<p>Two properties that are important to use regarding the TextureView are:</p>
<ul>
<li>The SurfaceTexture field</li>
<li>The SurfaceTextureListener interface</li>
</ul>
<p>The first is where the content will get displayed, and the second has four callbacks:</p>
<ol>
<li><a target="_blank" href="https://developer.android.com/reference/android/view/TextureView.SurfaceTextureListener#onSurfaceTextureAvailable%28android.graphics.SurfaceTexture,%20int,%20int%29">onSurfaceTextureAvailable</a></li>
<li><a target="_blank" href="https://developer.android.com/reference/android/view/TextureView.SurfaceTextureListener#onSurfaceTextureSizeChanged%28android.graphics.SurfaceTexture,%20int,%20int%29">onSurfaceTextureSizeChanged</a></li>
<li><a target="_blank" href="https://developer.android.com/reference/android/view/TextureView.SurfaceTextureListener#onSurfaceTextureUpdated%28android.graphics.SurfaceTexture%29">onSurfaceTextureUpdated</a></li>
<li><a target="_blank" href="https://developer.android.com/reference/android/view/TextureView.SurfaceTextureListener#onSurfaceTextureDestroyed%28android.graphics.SurfaceTexture%29">onSurfaceTextureDestroyed</a></li>
</ol>
<pre><code class="lang-kotlin"><span class="hljs-keyword">private</span> <span class="hljs-keyword">val</span> surfaceTextureListener = <span class="hljs-keyword">object</span> : TextureView.SurfaceTextureListener {
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onSurfaceTextureAvailable</span><span class="hljs-params">(texture: <span class="hljs-type">SurfaceTexture</span>, width: <span class="hljs-type">Int</span>, height: <span class="hljs-type">Int</span>)</span></span> {

        }
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onSurfaceTextureSizeChanged</span><span class="hljs-params">(texture: <span class="hljs-type">SurfaceTexture</span>, width: <span class="hljs-type">Int</span>, height: <span class="hljs-type">Int</span>)</span></span> {

        }

        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onSurfaceTextureDestroyed</span><span class="hljs-params">(texture: <span class="hljs-type">SurfaceTexture</span>)</span></span> {

        }
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onSurfaceTextureUpdated</span><span class="hljs-params">(texture: <span class="hljs-type">SurfaceTexture</span>)</span></span> {

        }
}
</code></pre>
<p>The first callback is crucial when using the camera. This is because we want to be notified when the SurfaceTexture is available so we can start displaying the feed on it. </p>
<p>Be aware that only once the TextureView is attached to a window does it become available.</p>
<p>Interacting with the camera has changed since the previous API. Now, we have the <a target="_blank" href="https://developer.android.com/reference/android/hardware/camera2/CameraManager">CameraManager</a>. This is a system service that allows us to interact with <a target="_blank" href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice">CameraDevice</a> objects. </p>
<p>The methods you want to pay close attention to are:</p>
<ul>
<li><a target="_blank" href="https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera%28java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler%29">openCamera</a></li>
<li><a target="_blank" href="https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraCharacteristics%28java.lang.String%29">getCameraCharacteristics</a></li>
<li><a target="_blank" href="https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList%28%29">getCameraIdList</a></li>
</ul>
<p>After we know that the TextureView is available and ready, we need to call openCamera to open a connection to the camera. This method takes in three arguments:</p>
<ol>
<li>CameraId - String</li>
<li>CameraDevice.StateCallback</li>
<li>A Handler</li>
</ol>
<p>The CameraId argument signifies which camera we want to connect to. On your phone, there are mainly two cameras, the front and the back. Each has its own unique id. Usually, it is either a zero or a one. </p>
<p>How do we get the camera id? We use the CameraManager’s getCamerasIdList method. It will return an array of string type of all the camera ids identified from the device.</p>
<pre><code class="lang-kotlin"><span class="hljs-keyword">val</span> cameraManager: CameraManager = getSystemService(Context.CAMERA_SERVICE) <span class="hljs-keyword">as</span> CameraManager
<span class="hljs-keyword">val</span> cameraIds: Array&lt;String&gt; = cameraManager.cameraIdList
<span class="hljs-keyword">var</span> cameraId: String = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> (id <span class="hljs-keyword">in</span> cameraIds) {
    <span class="hljs-keyword">val</span> cameraCharacteristics = cameraManager.getCameraCharacteristics(id)
    <span class="hljs-comment">//If we want to choose the rear facing camera instead of the front facing one</span>
    <span class="hljs-keyword">if</span> (cameraCharacteristics.<span class="hljs-keyword">get</span>(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT) 
      <span class="hljs-keyword">continue</span>
    }

    <span class="hljs-keyword">val</span> previewSize = cameraCharacteristics.<span class="hljs-keyword">get</span>(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)!!.getOutputSizes(ImageFormat.JPEG).maxByOrNull { it.height * it.width }!!
    <span class="hljs-keyword">val</span> imageReader = ImageReader.newInstance(previewSize.width, previewSize.height, ImageFormat.JPEG, <span class="hljs-number">1</span>)
    imageReader.setOnImageAvailableListener(onImageAvailableListener, backgroundHandler)
    cameraId = id
}
</code></pre>
<p>The next arguments are callbacks to the camera state after we try to open it. If you think about it, there can only be several outcomes for this action:</p>
<ul>
<li>The camera manages to open successfully</li>
<li>The camera disconnects</li>
<li>Some error occurs</li>
</ul>
<p>And that’s what you will find inside the CameraDevice.StateCallback:</p>
<pre><code class="lang-kotlin"> <span class="hljs-keyword">private</span> <span class="hljs-keyword">val</span> cameraStateCallback = <span class="hljs-keyword">object</span> : CameraDevice.StateCallback() {
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onOpened</span><span class="hljs-params">(camera: <span class="hljs-type">CameraDevice</span>)</span></span> {

        }

        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onDisconnected</span><span class="hljs-params">(cameraDevice: <span class="hljs-type">CameraDevice</span>)</span></span> {

        }

        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onError</span><span class="hljs-params">(cameraDevice: <span class="hljs-type">CameraDevice</span>, error: <span class="hljs-type">Int</span>)</span></span> {
            <span class="hljs-keyword">val</span> errorMsg = <span class="hljs-keyword">when</span>(error) {
                ERROR_CAMERA_DEVICE -&gt; <span class="hljs-string">"Fatal (device)"</span>
                ERROR_CAMERA_DISABLED -&gt; <span class="hljs-string">"Device policy"</span>
                ERROR_CAMERA_IN_USE -&gt; <span class="hljs-string">"Camera in use"</span>
                ERROR_CAMERA_SERVICE -&gt; <span class="hljs-string">"Fatal (service)"</span>
                ERROR_MAX_CAMERAS_IN_USE -&gt; <span class="hljs-string">"Maximum cameras in use"</span>
                <span class="hljs-keyword">else</span> -&gt; <span class="hljs-string">"Unknown"</span>
            }
            Log.e(TAG, <span class="hljs-string">"Error when trying to connect camera <span class="hljs-variable">$errorMsg</span>"</span>)
        }
    }
</code></pre>
<p>The third argument deals with where this work will happen. Since we don’t want to occupy the main thread, it is better to do this work in the background. </p>
<p>That’s why we need to pass a Handler to it. It would be wise to have this handler instance instantiated with a thread of our choosing so we can delegate work to it.</p>
<pre><code class="lang-kotlin"><span class="hljs-keyword">private</span> <span class="hljs-keyword">lateinit</span> <span class="hljs-keyword">var</span> backgroundHandlerThread: HandlerThread
<span class="hljs-keyword">private</span> <span class="hljs-keyword">lateinit</span> <span class="hljs-keyword">var</span> backgroundHandler: Handler

 <span class="hljs-keyword">private</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">startBackgroundThread</span><span class="hljs-params">()</span></span> {
    backgroundHandlerThread = HandlerThread(<span class="hljs-string">"CameraVideoThread"</span>)
    backgroundHandlerThread.start()
    backgroundHandler = Handler(
        backgroundHandlerThread.looper)
}

<span class="hljs-keyword">private</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">stopBackgroundThread</span><span class="hljs-params">()</span></span> {
    backgroundHandlerThread.quitSafely()
    backgroundHandlerThread.join()
}
</code></pre>
<p>With everything that we have done, we can now call openCamera:</p>
<pre><code class="lang-kotlin">cameraManager.openCamera(cameraId, cameraStateCallback,backgroundHandler)
</code></pre>
<p>Then in the <strong>onOpened</strong> callback, we can start to deal with the logic on how to present the camera feed to the user via the TextureView.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/0_hW39WzgV8lm87Ql0.jpg" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral" rel="photo-creator noopener"&gt;Markus Spiske on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm<em>medium=referral" rel="photo-source noopener)</em></p>
<h3 id="heading-how-to-show-a-preview-of-the-feed">How to Show a Preview of the Feed</h3>
<p>We've got our camera (cameraDevice) and our TextureView to show the feed. But we need to connect them to each other so we can show a preview of the feed. </p>
<p>To do that, we will be using the SurfaceTexture property of TextureView and we will be building a CaptureRequest.</p>
<pre><code class="lang-kotlin"><span class="hljs-keyword">val</span> surfaceTexture : SurfaceTexture? = textureView.surfaceTexture <span class="hljs-comment">// 1</span>

<span class="hljs-keyword">val</span> cameraCharacteristics = cameraManager.getCameraCharacteristics(cameraId) <span class="hljs-comment">//2</span>
<span class="hljs-keyword">val</span> previewSize = cameraCharacteristics.<span class="hljs-keyword">get</span>(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)!!
  .getOutputSizes(ImageFormat.JPEG).maxByOrNull { it.height * it.width }!!

surfaceTexture?.setDefaultBufferSize(previewSize.width, previewSize.height) <span class="hljs-comment">//3</span>

<span class="hljs-keyword">val</span> previewSurface: Surface = Surface(surfaceTexture)

captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW) <span class="hljs-comment">//4</span>
captureRequestBuilder.addTarget(previewSurface) <span class="hljs-comment">//5</span>

cameraDevice.createCaptureSession(listOf(previewSurface, imageReader.surface), captureStateCallback, <span class="hljs-literal">null</span>) <span class="hljs-comment">//6</span>
</code></pre>
<p>In the code above, first we get the surfaceTexture from our TextureView. Then we use the cameraCharacteristics object to get the list of all output sizes. To get the desired size, we set it for the surfaceTexture.</p>
<p>Next, we create a captureRequest where we pass in <strong>TEMPLATE_PREVIEW</strong>. We add our input surface to the captureRequest.</p>
<p>Finally, we start a captureSession with our input and output surfaces, captureStateCallback, and pass in null for the handler</p>
<p>So what is this captureStateCallback? If you remember the diagram from the beginning of this article, it is part of the CameraCaptureSession which we are starting. This object tracks the progress of the captureRequest with the following callbacks:</p>
<ul>
<li>onConfigured</li>
<li>onConfigureFailed</li>
</ul>
<pre><code class="lang-kotlin"><span class="hljs-keyword">private</span> <span class="hljs-keyword">val</span> captureStateCallback = <span class="hljs-keyword">object</span> : CameraCaptureSession.StateCallback() {
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onConfigureFailed</span><span class="hljs-params">(session: <span class="hljs-type">CameraCaptureSession</span>)</span></span> {

        }
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onConfigured</span><span class="hljs-params">(session: <span class="hljs-type">CameraCaptureSession</span>)</span></span> {

        }
}
</code></pre>
<p>When the <strong>cameraCaptureSession</strong> is configured successfully, we set a repeating request for the session to allow us to show the preview continuously. </p>
<p>To do that, we use the session object we get in the callback:</p>
<pre><code class="lang-kotlin"> session.setRepeatingRequest(captureRequestBuilder.build(), <span class="hljs-literal">null</span>, backgroundHandler)
</code></pre>
<p>You will recognize our captureRequestBuilder object that we created earlier as the first argument for this method. We enact the build method so the final parameter passed in is a CaptureRequest. </p>
<p>The second argument is a CameraCaptureSession.captureCallback listener, but since we don’t want to do anything with the captured images (since this is a preview), we pass in null. </p>
<p>The third argument is a handler, and here we use our own backgroundHandler. This is also why we passed in null in the previous section, since the repeating request will run on the background thread.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/dicky-jiang-ovUgpiDrbrc-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@dicky_juwono?utm_source=medium&amp;utm_medium=referral" rel="photo-creator noopener"&gt;Dicky Jiang on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm<em>medium=referral" rel="photo-source noopener)</em></p>
<h2 id="heading-how-to-take-a-picture">How to Take a Picture</h2>
<p>Having a live preview of the camera is awesome, but most users will probably want to do something with it. Some of the logic that we will write to take a picture will be similar to what we did in the previous section.</p>
<ol>
<li>We will create a captureRequest</li>
<li>We will use an ImageReader and its listener to gather the photo taken</li>
<li>Using our cameraCaptureSession, we will invoke the capture method</li>
</ol>
<pre><code class="lang-kotlin"><span class="hljs-keyword">val</span> orientations : SparseIntArray = SparseIntArray(<span class="hljs-number">4</span>).apply {
    append(Surface.ROTATION_0, <span class="hljs-number">0</span>)
    append(Surface.ROTATION_90, <span class="hljs-number">90</span>)
    append(Surface.ROTATION_180, <span class="hljs-number">180</span>)
    append(Surface.ROTATION_270, <span class="hljs-number">270</span>)
}

<span class="hljs-keyword">val</span> captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE)
captureRequestBuilder.addTarget(imageReader.surface)

<span class="hljs-keyword">val</span> rotation = windowManager.defaultDisplay.rotation
captureRequestBuilder.<span class="hljs-keyword">set</span>(CaptureRequest.JPEG_ORIENTATION, orientations.<span class="hljs-keyword">get</span>(rotation))
cameraCaptureSession.capture(captureRequestBuilder.build(), captureCallback, <span class="hljs-literal">null</span>)
</code></pre>
<p>But what is this <a target="_blank" href="https://developer.android.com/reference/android/media/ImageReader">ImageReader</a>? Well, an ImageReader provides access to image data that is rendered onto a surface. In our case, it is the surface of the TextureView. </p>
<p>If you look at the code snippet from the previous section, you will notice we have already defined an ImageReader there.</p>
<pre><code class="lang-kotlin"><span class="hljs-keyword">val</span> cameraManager: CameraManager = getSystemService(Context.CAMERA_SERVICE) <span class="hljs-keyword">as</span> CameraManager
<span class="hljs-keyword">val</span> cameraIds: Array&lt;String&gt; = cameraManager.cameraIdList
<span class="hljs-keyword">var</span> cameraId: String = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> (id <span class="hljs-keyword">in</span> cameraIds) {
    <span class="hljs-keyword">val</span> cameraCharacteristics = cameraManager.getCameraCharacteristics(id)
    <span class="hljs-comment">//If we want to choose the rear facing camera instead of the front facing one</span>
    <span class="hljs-keyword">if</span> (cameraCharacteristics.<span class="hljs-keyword">get</span>(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT) 
      <span class="hljs-keyword">continue</span>
    }

    <span class="hljs-keyword">val</span> previewSize = cameraCharacteristics.<span class="hljs-keyword">get</span>(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)!!.getOutputSizes(ImageFormat.JPEG).maxByOrNull { it.height * it.width }!!
    <span class="hljs-keyword">val</span> imageReader = ImageReader.newInstance(previewSize.width, previewSize.height, ImageFormat.JPEG, <span class="hljs-number">1</span>)
    imageReader.setOnImageAvailableListener(onImageAvailableListener, backgroundHandler)
    cameraId = id
}
</code></pre>
<p>As you can see above, we instantiate an ImageReader by passing in a width and height, the image format we would like our image to be in and the number of images that it can capture.</p>
<p>A property the ImageReader class has is a listener called onImageAvailableListener. This listener will get triggered once a photo is taken (since we passed in its surface as the output source for our capture request).</p>
<pre><code class="lang-kotlin"><span class="hljs-keyword">val</span> onImageAvailableListener = <span class="hljs-keyword">object</span>: ImageReader.OnImageAvailableListener{
        <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onImageAvailable</span><span class="hljs-params">(reader: <span class="hljs-type">ImageReader</span>)</span></span> {
            <span class="hljs-keyword">val</span> image: Image = reader.acquireLatestImage()
        }
    }
</code></pre>
<p>⚠️ <strong>Make sure to close the image after processing it or else you will not be able to take another photo.</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/jakob-owens-CiUR8zISX60-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@jakobowens1?utm_source=medium&amp;utm_medium=referral" rel="photo-creator noopener"&gt;Jakob Owens on &lt;a href="https://unsplash.com?utm_source=medium&amp;utm<em>medium=referral" rel="photo-source noopener)</em></p>
<h2 id="heading-how-to-record-a-video">How to Record a Video</h2>
<p>To record a video, we need to interact with a new object called <a target="_blank" href="https://developer.android.com/reference/android/media/MediaRecorder">MediaRecorder</a>. The media recorder object is in charge of recording audio and video and we will be using it do just that.</p>
<p>Before we do anything, we need to setup the media recorder. There are various configurations to deal with and <strong>they must be in the correct order or else exceptions will be thrown</strong>. </p>
<p>Below is an example of a selection of configurations that will allow us to capture video (without audio).</p>
<pre><code class="lang-kotlin"><span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">setupMediaRecorder</span><span class="hljs-params">(width: <span class="hljs-type">Int</span>, height: <span class="hljs-type">Int</span>)</span></span> {
  <span class="hljs-keyword">val</span> mediaRecorder: MediaRecorder = MediaRecorder()
  mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE)
  mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4)
  mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264)
  mediaRecorder.setVideoSize(videoSize.width, videoSize.height)
  mediaRecorder.setVideoFrameRate(<span class="hljs-number">30</span>)
  mediaRecorder.setOutputFile(PATH_TO_FILE)
  mediaRecorder.setVideoEncodingBitRate(<span class="hljs-number">10_000_000</span>)
  mediaRecorder.prepare()
}
</code></pre>
<p>Pay attention to the <strong>setOutputFile</strong> method as it expects a path to the file which will store our video. At the end of setting all these configurations we need to call prepare.</p>
<p>Note that the mediaRecorder also has a start method and we must call prepare before calling it.</p>
<p>After setting up our mediaRecoder, we need to create a capture request and a capture session.</p>
<pre><code class="lang-kotlin"><span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">startRecording</span><span class="hljs-params">()</span></span> {
        <span class="hljs-keyword">val</span> surfaceTexture : SurfaceTexture? = textureView.surfaceTexture
        surfaceTexture?.setDefaultBufferSize(previewSize.width, previewSize.height)
        <span class="hljs-keyword">val</span> previewSurface: Surface = Surface(surfaceTexture)
        <span class="hljs-keyword">val</span> recordingSurface = mediaRecorder.surface
        captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD)
        captureRequestBuilder.addTarget(previewSurface)
        captureRequestBuilder.addTarget(recordingSurface)

        cameraDevice.createCaptureSession(listOf(previewSurface, recordingSurface), captureStateVideoCallback, backgroundHandler)
    }
</code></pre>
<p>Similar to setting up the preview or taking a photograph, we have to define our input and output surfaces. </p>
<p>Here we are creating a Surface object from the surfaceTexture of the TextureView and also taking the surface from the media recorder. We are passing in the <strong>TEMPLATE_RECORD</strong> value when creating a capture request. </p>
<p>Our captureStateVideoCallback is of the same type we used for the still photo, but inside the onConfigured callback we call media recorder’s start method.</p>
<pre><code class="lang-kotlin"><span class="hljs-keyword">val</span> captureStateVideoCallback = <span class="hljs-keyword">object</span> : CameraCaptureSession.StateCallback() {
      <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onConfigureFailed</span><span class="hljs-params">(session: <span class="hljs-type">CameraCaptureSession</span>)</span></span> {

      }

      <span class="hljs-keyword">override</span> <span class="hljs-function"><span class="hljs-keyword">fun</span> <span class="hljs-title">onConfigured</span><span class="hljs-params">(session: <span class="hljs-type">CameraCaptureSession</span>)</span></span> {
          session.setRepeatingRequest(captureRequestBuilder.build(), <span class="hljs-literal">null</span>, backgroundHandler)
          mediaRecorder.start()
      }
  }
</code></pre>
<p>Now we are recording a video, but how do we stop recording? For that, we will be using the stop and reset methods on the mediaRecorder object:</p>
<pre><code class="lang-kotlin">mediaRecorder.stop()
mediaRecorder.reset()
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>That was a lot to process. So if you made it here, congratulations! There is no way around it – only by getting your hands dirty with the code will you start to understand how everything connects together. </p>
<p>You are more than encouraged to look at all the code featured in this article below :</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/TomerPacific/MediumArticles/tree/master/Camrea2API">https://github.com/TomerPacific/MediumArticles/tree/master/Camrea2API</a></div>
<p>Bear in mind that this is just the tip of the iceberg when it comes to the Camera2 API. There are a lot of other things you can do, like capturing a slow motion video, switching between the front and back cameras, controlling the focus, and much more.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Reverse Image Search on Your Phone or Desktop – Free Image Lookup Tools ]]>
                </title>
                <description>
                    <![CDATA[ By Adam Naor Over the past two years, mobile searches for “image search” have grown by over 60% according to Google.  That is because image search allows users to visualize any given keyword from thousands of images from around the internet.  Perhaps... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-reverse-image-search-on-your-phone-or-desktop/</link>
                <guid isPermaLink="false">66d45d6ab3016bf139028d21</guid>
                
                    <category>
                        <![CDATA[ Google ]]>
                    </category>
                
                    <category>
                        <![CDATA[ image ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ search ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 18 Dec 2020 22:01:44 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5fdd0892e6787e09839406ee.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Adam Naor</p>
<p>Over the past two years, mobile searches for “image search” have grown by over 60% according to Google. </p>
<p>That is because image search allows users to visualize any given keyword from thousands of images from around the internet. </p>
<p>Perhaps you have seen images from online photo editors, a landscape painting, or a cool product release that catches your eye and you want to learn more. </p>
<p>Image search is the answer.</p>
<p>Reverse image search allows you to do work backwards and gain new insights from the image itself. I will detail how reverse image search works across multiple platforms so you will be well prepared to harness this technology going forward.</p>
<h2 id="heading-what-is-a-reverse-image-search">What Is a Reverse Image Search?</h2>
<p>This technology enables you to Google the origins of any photograph, artwork, graph, or photo. By reverse image searching, you can find the image on all the pages on which it was featured - even if the image is a different aspect ratio or file size. </p>
<p>You can also find links to image search results of similar images. In addition, image search offers your query possible related searches.</p>
<p>You can start a reverse search image on your phone or desktop through Google, Bing, or any similar tool. I will walk you through the exact steps now.</p>
<h2 id="heading-how-to-reverse-image-search-on-desktop">How to Reverse Image Search on Desktop</h2>
<p>You have a few options for image search depending on your preferences, operating system, and device.</p>
<h3 id="heading-reverse-image-search-with-a-desktop-browser"><strong>Reverse Image Search With a Desktop Browser</strong></h3>
<p>To perform this version of an image search, follow these steps:</p>
<ol>
<li>Start by going to <a target="_blank" href="https://images.google.com/">images.google.com</a>.</li>
<li><p>Next, click on the camera icon which will allow you to choose from two options. </p>
</li>
<li><p>First, you can paste the URL of an image from another page.</p>
</li>
<li>The second option is to upload the image itself.   </li>
</ol>
<p><img src="https://lh4.googleusercontent.com/p0Npw4idkZLuSp1Jkk2u1K6_Fn9Z13ZmVGzqCkYKS4rKQIHCzjcDTb02YutU6Db5u8oMpXu_eFILD8an-r_sqekvOyQsuKsIOiPfDTIRDV5XQKpzuhSEitJPZGHQmEJn_J0HfZlH" alt="Image" width="1366" height="768" loading="lazy"></p>
<ol start="3">
<li>Then, simply click ‘enter’ on your keyword or the ‘search by image’ button to get results.</li>
</ol>
<h3 id="heading-reverse-image-search-with-google-chrome-desktop-browser"><strong>Reverse Image Search with Google Chrome Desktop Browser</strong></h3>
<p>If you are already using Google Chrome, then you can shortcut the process significantly. When stumbling upon an image on any page online on Chrome, you can carry out a reverse image search by following these steps:</p>
<ol>
<li>Right-click on the image you would like to find out more about.</li>
<li>Choose ‘Search Google for Image’ from the drop-down menu.  </li>
</ol>
<p><img src="https://lh4.googleusercontent.com/HGRNCk9ktfpPCocQ2FMud29h-69hHnCuiBLvcJxQ-TxOxV9SWN0BcKFw73NP9WR26iNwU_R_HwMXB933XELhiUcDKzm4vtX0QDz3OoC9R5gnfGuuSFIjddmYZ-fQPFXx51FUQGvO" alt="Image" width="1366" height="768" loading="lazy"></p>
<p>This straightforward method will display your search results instantly.</p>
<p><img src="https://lh5.googleusercontent.com/V9YXAyoiN1DdkP6k_-3UNlpgEP3sb-Jxm5ebYMEBeQkAM1GrHEU4BQX4SLbOHEgEv1Cssrk5wBgCnippFBWq0kR-pUNcKMm2_OpDGHfAxcZM0vVcbbKgQNcrDBFO_Jjd5FoDkY4a" alt="Image" width="1366" height="768" loading="lazy"></p>
<p>Image search is very powerful. Here is one example. I recently saw this photo and was intrigued. I wanted to learn more. </p>
<p>So I uploaded it to Google and was told that the photo featured Sineenat Wongvajirapakdi, a Thai nurse, army officer, and member of the Thai royal court. </p>
<p>Without image search I never could have found that information out.</p>
<p><img src="https://lh3.googleusercontent.com/b0JXALnXEM7ou_x2n9uBlnAvY8TNTsIiPc5ejnuio3NA_Acch7csdP6MfT2qAJXDyvpaeE2T3eAhKycdI7mvMX9eZomaQzkZSI2rqeoiuNwfjF30qsgYKeeOELd-IuBqKDF3WWdo" alt="Image" width="1172" height="782" loading="lazy"></p>
<h3 id="heading-reverse-image-search-using-microsoft-bing"><strong>Reverse Image Search Using Microsoft Bing</strong></h3>
<p>Since Bing has over 10% market share worldwide, it is safe to say there is a whole audience of builders and developers using it. So I wanted to include steps for this search engine too.</p>
<p>Bing’s visual search is slightly different from Google’s. This is because it detects shopping intents, for example, and provides search results that contain other similar products with their pricing information.</p>
<p>Here is how to conduct a reverse image search on Microsoft Bing:</p>
<ol>
<li>Open Microsoft Bing through a browser or the application.</li>
</ol>
<p><img src="https://lh3.googleusercontent.com/E40ZZFWuXC8TURcl0saNbPCjxqpgIZD-qOOPNp3L4nIQX6cN7hAgarrhIhgSsvTPVm0_3WuqrfZmPkQ91k_IA8GjRFlfoVYdd2_SJZGNtxOLlwevlDRHR_INzRUJBkdYwkqi7Hmo" alt="Image" width="1366" height="768" loading="lazy"></p>
<ol start="2">
<li>Click the camera-shaped icon in the search bar.</li>
</ol>
<p><img src="https://lh6.googleusercontent.com/vQn9-9OW_DzK6aOBciFr27lJ04ZhBkdssWAxMitBIEETnpY_eV4TSemah5sl0Hj-OxI4myCkTeYHYXm1O845C3eL9cr2LWvaHube3e0kwkFLWFioVRE-gwWW3QPGiMEOpkLwY_wk" alt="Image" width="1366" height="768" loading="lazy"></p>
<ol start="3">
<li><p>The pop-up menu will give you four options to search with a picture instead of text. Let’s explore the options:</p>
</li>
<li><p>First, drag one or more images to the search box from your computer.</p>
</li>
<li>Second, browse your computer for the image you would like to search for.</li>
<li>You can also paste the URL of the image from an online page that you were previously browsing.</li>
<li>The final option is to take a photo and search for more information on it. Whether it is a product or a location, you can find out more.</li>
</ol>
<p>Finally, browse the visual search results at your leisure. </p>
<p><img src="https://lh6.googleusercontent.com/44mmbBwM1nJt46O5ZMjwM46QgfFwIskb4fsHGH2nra3zgDjbHv2LlIE4TlqH70EnAGaQjpuDQiTRUXpN8jyVz009z7DEedrf1HzkYGMyZcXvmmrGUze1_DJwF_XN6s9IBylWlyui" alt="Image" width="1366" height="768" loading="lazy"></p>
<h2 id="heading-how-to-reverse-image-search-on-your-phone">How to Reverse Image Search on Your Phone</h2>
<p>It can be slightly more challenging to do a reverse image search on your phone. You have multiple options, but they require a few more steps. Let’s walk through them together.</p>
<h3 id="heading-reverse-image-search-using-the-google-chrome-app"><strong>Reverse Image Search Using the Google Chrome App</strong></h3>
<p>Unfortunately, the Google Chrome application itself does not support reverse image search on Mobile. But you can still do it through a smart workaround, which I will share with you. Here is how to do it: </p>
<ol>
<li>Open Google Chrome and type in ‘<a target="_blank" href="https://images.google.com/">images.google.com</a>’.</li>
<li>Tap the three-dots menu on the top right of your screen.</li>
<li>Pick ‘Desktop Site’ from the drop-down menu.</li>
<li>Click on the camera-shaped button in the search bar and insert your image in either method that suits you.</li>
</ol>
<h3 id="heading-reverse-image-search-using-any-browser-app"><strong>Reverse Image Search Using Any Browser App</strong></h3>
<p>Have you found an image that you would like to know more about on the spot while you were browsing? How do you reverse image search that exact photo? Here are the steps:</p>
<ol>
<li>Keep a long press on the image you would like to search.</li>
</ol>
<p><img src="https://lh4.googleusercontent.com/Bam58BBAf7yvzo3I-l1VdKRJ1tfV6OWsEpP9ioaINpdixkqK5SzoTP8Z1Y0MxSBUuleMBhSuXm_61bVDAAN6Gzu17EQ7OpWPYOFg6n-BJPYAd5C4vSFthxqckzVJMY4qub1IthMT" alt="Image" width="1065" height="1600" loading="lazy"></p>
<ol start="2">
<li>From the drop-down menu, select ‘Search Google for this image’.</li>
</ol>
<p>There is nothing left to do but browse the search results for more information.</p>
<h3 id="heading-reverse-image-search-using-the-google-lens-app"><strong>Reverse Image Search Using the Google Lens App</strong></h3>
<p>Google Lens is an application that allows users to search by image in multiple ways. From scanning and translating texts to searching for fashion items in different online stores, this application fulfills any search by image scenario you can think of. </p>
<p>Let’s see how it works:</p>
<ol>
<li>Download and launch the Google Lens application.</li>
<li><p>Choose the action you need for the image you will be searching for. Here are your options:</p>
</li>
<li><p>Translate: this feature allows you to translate any text on any image immediately through auto-detect. You can choose the language the text is in or the language you would like it to translate to.</p>
</li>
<li>Text: this instant copier can copy any text on your image for you to paste anywhere you would like.</li>
</ol>
<p><img src="https://lh5.googleusercontent.com/Mtus4bkyOzzFQrfL8k3H_AMsASQ9Q3a4oyfqO5mGxfx7F_purJeNfViCvx4-xDCUwbXCqijORDjH93aLC6bkfCk1FdrRqrfzmPDNu6clv_falNCqmEfwbTFe6BmybsDjcynJdBGY" alt="Image" width="900" height="1600" loading="lazy"></p>
<ul>
<li>Search: this button pretty much does the standard Google image search on whatever item or photo you are looking for.</li>
</ul>
<p><img src="https://lh5.googleusercontent.com/eMUjsYvUHhwksN_AnIFlMH_jNFL2pyIDD7IYMOyekvu7uv4VvTAQ0SpD-zYtjVM6imU-Glw_AnOWSO-LqohQmhgDZVNCKNGLZJkGDbucN0wIDHtfYAmKh4jP1knwtQgJyFNzUYMF" alt="Image" width="900" height="1600" loading="lazy"></p>
<p><img src="https://lh6.googleusercontent.com/mQ6PPs5nMvB0EuyfmamBr34rgt45ZZ3a9HsIcx7V8DkIO3z-WCxRbIVuQfBFGndUQyY__PYN3mtV2yXsPtzPI7Kcm3pdoIxx1PeJZ6O6rcJhxHGZGjqGQEmg1e37RcE6s3wYWuNa" alt="Image" width="900" height="1600" loading="lazy"></p>
<ul>
<li>Shopping: this allows you to know more about a certain product in the image or even through its barcode.</li>
<li>Dining: this fun feature lets you find out more about a dish or translate a restaurant’s menu.</li>
</ul>
<p>You will have two options for uploading the image:</p>
<ul>
<li>Take a photo of something in front of you that you would like to search for on the spot.</li>
<li>Or upload a photo from your phone that includes what you would like to know more about.</li>
</ul>
<h3 id="heading-reverse-image-search-using-pinterest-lens"><strong>Reverse Image Search Using Pinterest Lens</strong></h3>
<p>Pinterest is one of the most popular applications in the world. Its search by image feature under the name ‘Pinterest Lens’ has revolutionized the digital shopping world. </p>
<p>By following these steps, you can find, save, or shop for any item in an image you love:</p>
<ol>
<li>Launch the Pinterest app on your phone.</li>
<li>Click on the search button in the menu at the bottom of your screen.  </li>
</ol>
<p><img src="https://lh5.googleusercontent.com/caqyzpq6GqDFkDCdehbjiXsplmkdWinWw0lPZ7yxaDvkCJ0IulXGVeKF403EDPXwSCDXFhE2Ac6x5xJ3uM31gQeY9dgnHpsBfSlaQ6W6qu4UOBy2mKydUYrDuJZnOT39vHjxRwrv" alt="Image" width="900" height="1600" loading="lazy"></p>
<ol start="3">
<li><p>Tap the camera-shaped button in the search bar at the top of the screen.</p>
</li>
<li><p>You will have two options to pick your image:</p>
</li>
<li><p>Take a photo with your mobile’s camera and begin your search.</p>
</li>
<li>Or upload an image from your gallery.</li>
</ol>
<p><img src="https://lh6.googleusercontent.com/Tzr6cCYEpdKAcnKWtGHRQIr9Rd_I-g0xnDlmX6en5ST6E7afxbVeMAimiOSSHLSaqtK4oOqO0HPiPQ3yfMwlRqcGt9B7b0rTNrRt38Pwl6UyjvhZu8XaHCX2woQhWtO6NDnjTmzG" alt="Image" width="900" height="1600" loading="lazy"></p>
<h2 id="heading-bringing-it-all-together">Bringing It All Together</h2>
<p>This article has covered some fun, easy, and powerful tips for perfecting a reverse image search on your phone or desktop. </p>
<p>Reverse image search is enriching for learning, exploration, and the curious builder.</p>
<p>Not only do consumers benefit from this technology, but companies do too as they build out and scale their products. If you think reverse image search is just for fun and consumers, let me help you see the commercial potential.</p>
<p>Customer service software is increasingly using reverse image search to help agents resolve customer support tickets. The same is true for technology agencies as they look for products to purchase to help their clients. </p>
<p>A friend of mine built a company that made visual recognition software for maintenance and repair supplies. How did that company end up? Well, it was acquired by Google.  </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Create a Camera App with Expo and React Native ]]>
                </title>
                <description>
                    <![CDATA[ By Said Hayani If you are not familiar with expo, it's a client that helps you build React Native apps with less build complexity. It also helps you deal with the stress of installing and setting up your environment to run React Native. In this tutor... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-create-a-camera-app-with-expo-and-react-native/</link>
                <guid isPermaLink="false">66d460d6787a2a3b05af43fe</guid>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React Native ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 21 Oct 2020 00:36:34 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9825740569d1a4ca186e.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Said Hayani</p>
<p>If you are not familiar with <a target="_blank" href="https://expo.io/">expo</a>, it's a client that helps you build React Native apps with less build complexity. It also helps you deal with the stress of installing and setting up your environment to run React Native.</p>
<p>In this tutorial, we will be building a simple camera app in which the user can take pictures, see previews of their pictures, use flash mode, and switch between the front and the back cameras.</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<p>Expo doesn't require much to start building your first React Native app. You can learn more about installing <a target="_blank" href="https://docs.expo.io/get-started/installation/">expo and the expo-cli here in the docs</a>.</p>
<p>Note: in this tutorial, I will be using macOS and iOS. You can use Android as well, there is not much difference when using expo at this point.</p>
<p>You can install expo and expo-cli globally by running the following command:</p>
<pre><code class="lang-shell">npm install --global expo-cli
</code></pre>
<p>Expo requires <a target="_blank" href="https://nodejs.org/en/">Nodejs</a> in order to run. You can run the latest version on the official website <a target="_blank" href="https://nodejs.org/en/">here</a>.</p>
<h2 id="heading-getting-started">Getting Started</h2>
<p>After you've installed Expo and Nodejs, you can start bootstrapping a new Expo project with the command below:</p>
<pre><code class="lang-shell">expo init expo-camera-app
</code></pre>
<h3 id="heading-how-to-install-the-packages-and-run-the-app">How to install the packages and run the app</h3>
<p>Expo provides us with a client app where we can run and see the preview of the app we are building. It's available on both the <a target="_blank" href="https://apps.apple.com/us/app/expo-client/id982107779">App Store</a> and <a target="_blank" href="https://play.google.com/store/apps/details?id=host.exp.exponent">Google Play</a> to download.</p>
<p>This is the interface of the app.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_5488.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-init-an-expo-project">How to init an expo project</h3>
<p>Go the app directory and run the app.</p>
<pre><code class="lang-shell">cd expo-camera-app
</code></pre>
<p>You will be asked a few questions to select the default template for the app. In this tutorial we simply select a blank (TypeScript) option, but again you are free to choose what is right for you.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Screen-Shot-2020-10-18-at-5.06.18-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-run-the-app">Run the app</h3>
<p>After bootstrapping the project, we can run the app with <code>expo run</code></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Screen-Shot-2020-10-18-at-4.52.46-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This will open a window in your browser where you can see the logs. It will also generate a QR code that you can scan to run the app on your device.</p>
<p>The good thing about expo is that you don't need to install and configure the simulators to run the app. It still gives you the option to run expo on the simulator, but you have to install and configure the simulator by yourself.</p>
<p>Back to our app. Assuming you've successfully run the app on the device, this will be the default screen:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_5489.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Open the app directory in your favorite code editor. I'm using <a target="_blank" href="https://code.visualstudio.com/">VS Code</a>.</p>
<p>The <code>App.tsx</code> will look like this:</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> {StatusBar} <span class="hljs-keyword">from</span> <span class="hljs-string">'expo-status-bar'</span>
<span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> {StyleSheet, Text, View} <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native'</span>

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">View</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.container}</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Text</span>&gt;</span>Open up App.tsx to start working on your app!<span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">StatusBar</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"auto"</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">const</span> styles = StyleSheet.create({
  <span class="hljs-attr">container</span>: {
    <span class="hljs-attr">flex</span>: <span class="hljs-number">1</span>,
    <span class="hljs-attr">backgroundColor</span>: <span class="hljs-string">'#fff'</span>,
    <span class="hljs-attr">alignItems</span>: <span class="hljs-string">'center'</span>,
    <span class="hljs-attr">justifyContent</span>: <span class="hljs-string">'center'</span>
  }
})
</code></pre>
<h2 id="heading-how-to-create-the-ui">How to create the UI</h2>
<p>After having the project running, now it's time to start creating some UI.</p>
<h3 id="heading-install-expo-camera">Install expo-camera</h3>
<p>The next step is to install <a target="_blank" href="https://docs.expo.io/versions/latest/sdk/camera/">expo-camera</a>, like this:</p>
<pre><code class="lang-shell">expo install expo-camera
</code></pre>
<p>We will create a simple UI that will allow the user to start the process of using the camera.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_5490.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> {StatusBar} <span class="hljs-keyword">from</span> <span class="hljs-string">'expo-status-bar'</span>
<span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> {StyleSheet, Text, View, TouchableOpacity} <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native'</span>

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">View</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.container}</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">View</span>
        <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
          <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
          <span class="hljs-attr">backgroundColor:</span> '#<span class="hljs-attr">fff</span>',
          <span class="hljs-attr">justifyContent:</span> '<span class="hljs-attr">center</span>',
          <span class="hljs-attr">alignItems:</span> '<span class="hljs-attr">center</span>'
        }}
      &gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">TouchableOpacity</span>
          <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
            <span class="hljs-attr">width:</span> <span class="hljs-attr">130</span>,
            <span class="hljs-attr">borderRadius:</span> <span class="hljs-attr">4</span>,
            <span class="hljs-attr">backgroundColor:</span> '#<span class="hljs-attr">14274e</span>',
            <span class="hljs-attr">flexDirection:</span> '<span class="hljs-attr">row</span>',
            <span class="hljs-attr">justifyContent:</span> '<span class="hljs-attr">center</span>',
            <span class="hljs-attr">alignItems:</span> '<span class="hljs-attr">center</span>',
            <span class="hljs-attr">height:</span> <span class="hljs-attr">40</span>
          }}
        &gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">Text</span>
            <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
              <span class="hljs-attr">color:</span> '#<span class="hljs-attr">fff</span>',
              <span class="hljs-attr">fontWeight:</span> '<span class="hljs-attr">bold</span>',
              <span class="hljs-attr">textAlign:</span> '<span class="hljs-attr">center</span>'
            }}
          &gt;</span>
            Take picture
          <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">TouchableOpacity</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">StatusBar</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"auto"</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">const</span> styles = StyleSheet.create({
  <span class="hljs-attr">container</span>: {
    <span class="hljs-attr">flex</span>: <span class="hljs-number">1</span>,
    <span class="hljs-attr">backgroundColor</span>: <span class="hljs-string">'#fff'</span>,
    <span class="hljs-attr">alignItems</span>: <span class="hljs-string">'center'</span>,
    <span class="hljs-attr">justifyContent</span>: <span class="hljs-string">'center'</span>
  }
})
</code></pre>
<p>It's a simple UI: we import <code>TouchableOpacity</code> for the button and do some simple styling. If you are wondering how styling works in React Native, you can check out my two articles here:</p>
<ul>
<li><a target="_blank" href="https://blog.bitsrc.io/styling-in-react-native-c48caddfbe47">Styling in React Native</a></li>
<li><a target="_blank" href="https://blog.bitsrc.io/demystifying-flexbox-in-react-native-4b62979fa9ea">Demystifying Flexbox in React Native</a></li>
</ul>
<p>Now we have to use a <code>useState</code> hook to manage the state and display the camera view when the user press the <strong>take picture</strong> button.</p>
<pre><code class="lang-jsx">  &lt;TouchableOpacity
        onPress={__startCamera}
          style={{
            <span class="hljs-attr">width</span>: <span class="hljs-number">130</span>,
            <span class="hljs-attr">borderRadius</span>: <span class="hljs-number">4</span>,
            <span class="hljs-attr">backgroundColor</span>: <span class="hljs-string">'#14274e'</span>,
            <span class="hljs-attr">flexDirection</span>: <span class="hljs-string">'row'</span>,
            <span class="hljs-attr">justifyContent</span>: <span class="hljs-string">'center'</span>,
            <span class="hljs-attr">alignItems</span>: <span class="hljs-string">'center'</span>,
            <span class="hljs-attr">height</span>: <span class="hljs-number">40</span>
          }}
        &gt;
          <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Text</span>
            <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
              <span class="hljs-attr">color:</span> '#<span class="hljs-attr">fff</span>',
              <span class="hljs-attr">fontWeight:</span> '<span class="hljs-attr">bold</span>',
              <span class="hljs-attr">textAlign:</span> '<span class="hljs-attr">center</span>'
            }}
          &gt;</span>
            Take picture
          <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span></span>
        &lt;/TouchableOpacity&gt;
</code></pre>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> [startCamera,setStartCamera] = React.useState(<span class="hljs-literal">false</span>)

<span class="hljs-keyword">const</span> __startCamera = <span class="hljs-function">()=&gt;</span>{

}
</code></pre>
<p>There are two important things we have to do when the user presses the button:</p>
<ul>
<li>Ask permission to access the camera. In mobile development, accessing many native APIs and mobile features is often restricted by the user's permissions and the privacy. It's just something that you have to get used to when developing mobile apps.</li>
<li>Change the state and present the camera.</li>
</ul>
<p>Let's import the camera module from <code>expo-camera</code> with this command:</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> {Camera} <span class="hljs-keyword">from</span> <span class="hljs-string">'expo-camera'</span>
</code></pre>
<p>And add the camera view, like this:</p>
<pre><code class="lang-jsx">    &lt;Camera
    style={{<span class="hljs-attr">flex</span>: <span class="hljs-number">1</span>,<span class="hljs-attr">width</span>:<span class="hljs-string">"100%"</span>}}
    ref={<span class="hljs-function">(<span class="hljs-params">r</span>) =&gt;</span> {
    camera = r
    }}
    &gt;&lt;/Camera&gt;
</code></pre>
<p>We can use <code>ref</code> to access the camera's methods:</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">let</span> camera: Camera
</code></pre>
<p>When the <code>take picture</code> button is pressed the <code>__startCamera</code> function will be called:</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> __startCamera = <span class="hljs-keyword">async</span> () =&gt; {
    <span class="hljs-keyword">const</span> {status} = <span class="hljs-keyword">await</span> Camera.requestPermissionsAsync()
 <span class="hljs-keyword">if</span>(status === <span class="hljs-string">'granted'</span>){
   <span class="hljs-comment">// do something</span>

 }<span class="hljs-keyword">else</span>{
   Alert.alert(<span class="hljs-string">"Access denied"</span>)
 }
</code></pre>
<p>The function will ask for permission first. If the user grant access to the camera, we can proceed and open the camera. If not, we show a simple alert. </p>
<h3 id="heading-add-the-camera-component">Add the camera component</h3>
<p>Let's display the camera when the user grants access to the device's camera.</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> __startCamera = <span class="hljs-keyword">async</span> () =&gt; {
    <span class="hljs-keyword">const</span> {status} = <span class="hljs-keyword">await</span> Camera.requestPermissionsAsync()
    <span class="hljs-keyword">if</span> (status === <span class="hljs-string">'granted'</span>) {
      <span class="hljs-comment">// start the camera</span>
      setStartCamera(<span class="hljs-literal">true</span>)
    } <span class="hljs-keyword">else</span> {
      Alert.alert(<span class="hljs-string">'Access denied'</span>)
    }
  }
</code></pre>
<p>We have to make some changes to the UI and add a conditional rendering. We display the camera only when the user requests it, otherwise we display the default screen.</p>
<pre><code>  {startCamera ? (
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Camera</span>
          <span class="hljs-attr">style</span>=<span class="hljs-string">{{flex:</span> <span class="hljs-attr">1</span>,<span class="hljs-attr">width:</span>"<span class="hljs-attr">100</span>%"}}
          <span class="hljs-attr">ref</span>=<span class="hljs-string">{(r)</span> =&gt;</span> {
            camera = r
          }}
        &gt;<span class="hljs-tag">&lt;/<span class="hljs-name">Camera</span>&gt;</span></span>
      ) : (
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">View</span>
          <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
            <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
            <span class="hljs-attr">backgroundColor:</span> '#<span class="hljs-attr">fff</span>',
            <span class="hljs-attr">justifyContent:</span> '<span class="hljs-attr">center</span>',
            <span class="hljs-attr">alignItems:</span> '<span class="hljs-attr">center</span>'
          }}
        &gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">TouchableOpacity</span>
            <span class="hljs-attr">onPress</span>=<span class="hljs-string">{__startCamera}</span>
            <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
              <span class="hljs-attr">width:</span> <span class="hljs-attr">130</span>,
              <span class="hljs-attr">borderRadius:</span> <span class="hljs-attr">4</span>,
              <span class="hljs-attr">backgroundColor:</span> '#<span class="hljs-attr">14274e</span>',
              <span class="hljs-attr">flexDirection:</span> '<span class="hljs-attr">row</span>',
              <span class="hljs-attr">justifyContent:</span> '<span class="hljs-attr">center</span>',
              <span class="hljs-attr">alignItems:</span> '<span class="hljs-attr">center</span>',
              <span class="hljs-attr">height:</span> <span class="hljs-attr">40</span>
            }}
          &gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">Text</span>
              <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
                <span class="hljs-attr">color:</span> '#<span class="hljs-attr">fff</span>',
                <span class="hljs-attr">fontWeight:</span> '<span class="hljs-attr">bold</span>',
                <span class="hljs-attr">textAlign:</span> '<span class="hljs-attr">center</span>'
              }}
            &gt;</span>
              Take picture
            <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">TouchableOpacity</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span></span>
      )}
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2020/10/expo-camera.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Cool, now we need to add a button so we can take the actual picture.</p>
<h3 id="heading-add-the-capture-button">Add the capture button</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_5495.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is a simple <code>View</code> inside the camera view that has an absolute position. So we make sure that it is always on the top of the camera.</p>
<pre><code class="lang-jsx">    &lt;View
        style={{
        <span class="hljs-attr">position</span>: <span class="hljs-string">'absolute'</span>,
        <span class="hljs-attr">bottom</span>: <span class="hljs-number">0</span>,
        <span class="hljs-attr">flexDirection</span>: <span class="hljs-string">'row'</span>,
        <span class="hljs-attr">flex</span>: <span class="hljs-number">1</span>,
        <span class="hljs-attr">width</span>: <span class="hljs-string">'100%'</span>,
        <span class="hljs-attr">padding</span>: <span class="hljs-number">20</span>,
        <span class="hljs-attr">justifyContent</span>: <span class="hljs-string">'space-between'</span>
        }}
      &gt;
        <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">View</span>
        <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
        <span class="hljs-attr">alignSelf:</span> '<span class="hljs-attr">center</span>',
        <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
        <span class="hljs-attr">alignItems:</span> '<span class="hljs-attr">center</span>'
        }}
        &gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">TouchableOpacity</span>
            <span class="hljs-attr">onPress</span>=<span class="hljs-string">{__takePicture}</span>
            <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
            <span class="hljs-attr">width:</span> <span class="hljs-attr">70</span>,
            <span class="hljs-attr">height:</span> <span class="hljs-attr">70</span>,
            <span class="hljs-attr">bottom:</span> <span class="hljs-attr">0</span>,
            <span class="hljs-attr">borderRadius:</span> <span class="hljs-attr">50</span>,
            <span class="hljs-attr">backgroundColor:</span> '#<span class="hljs-attr">fff</span>'
            }}
            /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span></span>
    &lt;/View&gt;
</code></pre>
<h3 id="heading-how-to-take-a-picture">How to take a picture</h3>
<p>The app should take a picture when capture button is pressed. That function will look like the below:</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> __takePicture = <span class="hljs-keyword">async</span> () =&gt; {
    <span class="hljs-keyword">if</span> (!camera) <span class="hljs-keyword">return</span>
    <span class="hljs-keyword">const</span> photo = <span class="hljs-keyword">await</span> camera.takePictureAsync()

  }
</code></pre>
<p>First, we check that we have access to the <code>Camera</code> component using <code>ref</code>:</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">if</span> (!camera) <span class="hljs-keyword">return</span>
  <span class="hljs-comment">// if the camera is undefined or null, we stop the function execution</span>
</code></pre>
<p>Then we take the picture by calling the <code>takePictureAsync</code> method. It returns a promise and an object that contains the picture's details. The result will look like this:</p>
<pre><code class="lang-js"><span class="hljs-built_in">Object</span> {
  <span class="hljs-string">"height"</span>: <span class="hljs-number">4224</span>,
  <span class="hljs-string">"uri"</span>: <span class="hljs-string">"file:///var/mobile/Containers/Data/Application/E6740A15-93AF-4120-BF11-6E8B74AFBF93/Library/Caches/ExponentExperienceData/%2540anonymous%252Fcamera-app-ee0fa3c8-1bb1-4d62-9863-33bf26341c55/Camera/19F0C5DD-7CA6-4043-8D89-AF65A1055C7E.jpg"</span>,
  <span class="hljs-string">"width"</span>: <span class="hljs-number">1952</span>,
}
</code></pre>
<p>We are only interested in the Picture URL <code>uri</code>. After we take a picture, we have to show the photo preview and hide the camera view. To do that we will use two hooks to change the state:</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> [previewVisible, setPreviewVisible] = useState(<span class="hljs-literal">false</span>)
  <span class="hljs-keyword">const</span> [capturedImage, setCapturedImage] = useState&lt;any&gt;(<span class="hljs-literal">null</span>)
</code></pre>
<pre><code>  <span class="hljs-keyword">const</span> __takePicture = <span class="hljs-keyword">async</span> () =&gt; {
    <span class="hljs-keyword">if</span> (!camera) <span class="hljs-keyword">return</span>
    <span class="hljs-keyword">const</span> photo = <span class="hljs-keyword">await</span> camera.takePictureAsync()
    <span class="hljs-built_in">console</span>.log(photo)
    setPreviewVisible(<span class="hljs-literal">true</span>)
    setCapturedImage(photo)
  }
</code></pre><ul>
<li><code>setPreviewVisible</code> to show the preview</li>
<li><code>setCapturedImage(photo)</code> to store the object result</li>
</ul>
<p>Then we display the preview like this:</p>
<pre><code class="lang-jsx">  {previewVisible &amp;&amp; capturedImage ? (
            <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">CameraPreview</span> <span class="hljs-attr">photo</span>=<span class="hljs-string">{capturedImage}</span> /&gt;</span></span>
          ) : (
            <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Camera</span>
              <span class="hljs-attr">style</span>=<span class="hljs-string">{{flex:</span> <span class="hljs-attr">1</span>}}
              <span class="hljs-attr">ref</span>=<span class="hljs-string">{(r)</span> =&gt;</span> {
                camera = r
              }}
            &gt;
              <span class="hljs-tag">&lt;<span class="hljs-name">View</span>
                <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
                  <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
                  <span class="hljs-attr">width:</span> '<span class="hljs-attr">100</span>%',
                  <span class="hljs-attr">backgroundColor:</span> '<span class="hljs-attr">transparent</span>',
                  <span class="hljs-attr">flexDirection:</span> '<span class="hljs-attr">row</span>'
                }}
              &gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-name">View</span>
                  <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
                    <span class="hljs-attr">position:</span> '<span class="hljs-attr">absolute</span>',
                    <span class="hljs-attr">bottom:</span> <span class="hljs-attr">0</span>,
                    <span class="hljs-attr">flexDirection:</span> '<span class="hljs-attr">row</span>',
                    <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
                    <span class="hljs-attr">width:</span> '<span class="hljs-attr">100</span>%',
                    <span class="hljs-attr">padding:</span> <span class="hljs-attr">20</span>,
                    <span class="hljs-attr">justifyContent:</span> '<span class="hljs-attr">space-between</span>'
                  }}
                &gt;</span>
                  <span class="hljs-tag">&lt;<span class="hljs-name">View</span>
                    <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
                      <span class="hljs-attr">alignSelf:</span> '<span class="hljs-attr">center</span>',
                      <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
                      <span class="hljs-attr">alignItems:</span> '<span class="hljs-attr">center</span>'
                    }}
                  &gt;</span>
                    <span class="hljs-tag">&lt;<span class="hljs-name">TouchableOpacity</span>
                      <span class="hljs-attr">onPress</span>=<span class="hljs-string">{__takePicture}</span>
                      <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
                        <span class="hljs-attr">width:</span> <span class="hljs-attr">70</span>,
                        <span class="hljs-attr">height:</span> <span class="hljs-attr">70</span>,
                        <span class="hljs-attr">bottom:</span> <span class="hljs-attr">0</span>,
                        <span class="hljs-attr">borderRadius:</span> <span class="hljs-attr">50</span>,
                        <span class="hljs-attr">backgroundColor:</span> '#<span class="hljs-attr">fff</span>'
                      }}
                    /&gt;</span>
                  <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span>
              <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-name">Camera</span>&gt;</span></span>
          )}
</code></pre>
<p>The <code>CameraPreview</code> component looks like this:</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">const</span> CameraPreview = <span class="hljs-function">(<span class="hljs-params">{photo}: any</span>) =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'sdsfds'</span>, photo)
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">View</span>
      <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
        <span class="hljs-attr">backgroundColor:</span> '<span class="hljs-attr">transparent</span>',
        <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>,
        <span class="hljs-attr">width:</span> '<span class="hljs-attr">100</span>%',
        <span class="hljs-attr">height:</span> '<span class="hljs-attr">100</span>%'
      }}
    &gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">ImageBackground</span>
        <span class="hljs-attr">source</span>=<span class="hljs-string">{{uri:</span> <span class="hljs-attr">photo</span> &amp;&amp; <span class="hljs-attr">photo.uri</span>}}
        <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
          <span class="hljs-attr">flex:</span> <span class="hljs-attr">1</span>
        }}
      /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span></span>
  )
}
</code></pre>
<p>And the result looks like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/preview-camera.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-re-take-a-picture">How to re-take a picture</h3>
<p>We can add some buttons to the preview that will allow the user to perform more actions. For example, they could re-take the photo or save it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_5499.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Add the <code>savePhoto</code> and <code>retakePicture</code> props to the <code>CameraPreview</code> component like this:</p>
<pre><code>&lt;CameraPreview photo={capturedImage} savePhoto={__savePhoto} retakePicture={__retakePicture} /&gt;
</code></pre><p>When the <code>Re-take</code> button is pressed, we will have to hide the preview, remove the current picture, and show the camera again. Do that with the following code:</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> __retakePicture = <span class="hljs-function">() =&gt;</span> {
    setCapturedImage(<span class="hljs-literal">null</span>)
    setPreviewVisible(<span class="hljs-literal">false</span>)
    __startCamera()
  }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/re-take-preview.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-add-other-options-back-camera-flash-and-more">How to add other options – back camera, flash, and more</h2>
<p><strong>expo-camra</strong> offers many options for customizing the camera, like FlashMode, setting the Camera type (front/back), zooming, and so on.</p>
<h3 id="heading-how-to-add-flashmode">How to add FlashMode</h3>
<p>Let's add an option so the user can turn FlashMode on and off:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/flashmode-expo-camera.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We simply create a small button to switch off/on the flash, like this:</p>
<pre><code class="lang-jsx">        &lt;TouchableOpacity
            onPress={__handleFlashMode}
            style={{
            <span class="hljs-attr">position</span>: <span class="hljs-string">'absolute'</span>,
            <span class="hljs-attr">left</span>: <span class="hljs-string">'5%'</span>,
            <span class="hljs-attr">top</span>: <span class="hljs-string">'10%'</span>,
            <span class="hljs-attr">backgroundColor</span>: flashMode === <span class="hljs-string">'off'</span> ? <span class="hljs-string">'#000'</span> : <span class="hljs-string">'#fff'</span>,
            <span class="hljs-attr">borderRadius</span>: <span class="hljs-string">'50%'</span>,
            <span class="hljs-attr">height</span>: <span class="hljs-number">25</span>,
            <span class="hljs-attr">width</span>: <span class="hljs-number">25</span>
        }}
        &gt;
            <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Text</span>
                <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
                <span class="hljs-attr">fontSize:</span> <span class="hljs-attr">20</span>
                }}
            &gt;</span>
            ⚡️
            <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span></span>
        &lt;/TouchableOpacity&gt;
</code></pre>
<p>And we just change the state when the button is pressed:</p>
<pre><code class="lang-js">  <span class="hljs-keyword">const</span> [flashMode, setFlashMode] = React.useState(<span class="hljs-string">'off'</span>)

   <span class="hljs-keyword">const</span> __handleFlashMode = <span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">if</span> (flashMode === <span class="hljs-string">'on'</span>) {
      setFlashMode(<span class="hljs-string">'off'</span>)
    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (flashMode === <span class="hljs-string">'off'</span>) {
      setFlashMode(<span class="hljs-string">'on'</span>)
    } <span class="hljs-keyword">else</span> {
      setFlashMode(<span class="hljs-string">'auto'</span>)
    }

  }
</code></pre>
<p>And then we add FlashMode props:</p>
<pre><code class="lang-jsx">    &lt;Camera
    flashMode={flashMode}
    style={{<span class="hljs-attr">flex</span>: <span class="hljs-number">1</span>}}
    ref={<span class="hljs-function">(<span class="hljs-params">r</span>) =&gt;</span> {
    camera = r
    }}
    &gt;&lt;/Camera&gt;
</code></pre>
<h3 id="heading-how-to-access-the-front-and-the-back-camera">How to access the front and the back camera</h3>
<p>We will add a button that switches between the back and front camera.</p>
<p>We can get the default camera type directly from the camera module like below:</p>
<pre><code>  <span class="hljs-keyword">const</span> [cameraType, setCameraType] = React.useState(Camera.Constants.Type.back)
</code></pre><p>Add <code>type</code> props like this:</p>
<pre><code class="lang-jsx">    &lt;Camera
    type={cameraType}
    flashMode={flashMode}
    style={{<span class="hljs-attr">flex</span>: <span class="hljs-number">1</span>}}
    ref={<span class="hljs-function">(<span class="hljs-params">r</span>) =&gt;</span> {
    camera = r
    }}
    &gt;&lt;/Camera&gt;
</code></pre>
<p>And add the switch button:</p>
<pre><code class="lang-jsx">&lt;TouchableOpacity
    onPress={__switchCamera}
    style={{
    <span class="hljs-attr">marginTop</span>: <span class="hljs-number">20</span>,
    <span class="hljs-attr">borderRadius</span>: <span class="hljs-string">'50%'</span>,
    <span class="hljs-attr">height</span>: <span class="hljs-number">25</span>,
    <span class="hljs-attr">width</span>: <span class="hljs-number">25</span>
    }}
   &gt;
       <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Text</span>
           <span class="hljs-attr">style</span>=<span class="hljs-string">{{</span>
           <span class="hljs-attr">fontSize:</span> <span class="hljs-attr">20</span>
           }}
           &gt;</span>
       {cameraType === 'front' ? '?' : '?'}
       <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span></span>
&lt;/TouchableOpacity&gt;
</code></pre>
<p>And switch function:</p>
<pre><code class="lang-jsx">  <span class="hljs-keyword">const</span> __switchCamera = <span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">if</span> (cameraType === <span class="hljs-string">'back'</span>) {
      setCameraType(<span class="hljs-string">'front'</span>)
    } <span class="hljs-keyword">else</span> {
      setCameraType(<span class="hljs-string">'back'</span>)
    }
  }
</code></pre>
<p>Here is the result:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/camera-type-expo.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can find the full source code on <a target="_blank" href="https://github.com/hayanisaid/expo-camera-tutorial/tree/master">GitHub</a>.</p>
<h2 id="heading-wrapping-up">Wrapping up</h2>
<p>In general, Expo is an amazing tool that can save you a lot of time. It helps you start building directly and saves you the pain of environment setup. </p>
<p>Sometimes you may want to build a native extension and handle using native features in your own way. In this case I'd recommend using the <a target="_blank" href="https://github.com/react-native-community/cli">react-native</a> CLI so you can modify and play with native code easily.</p>
<blockquote>
<p>Hi, my name is Said Hayani. I created <a target="_blank" href="https://subscribi.io/">subscribi.io</a> to help creators, bloggers and influencers grow their audience through the newsletter.</p>
</blockquote>
<p>Join my <a target="_blank" href="https://subscribi.io/subscribe/5f63b2b306cb71c069272c47">Mailing list</a> if you are interested in reading more about React Native.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use Instagram Tutorial – Use IG Like a Pro ]]>
                </title>
                <description>
                    <![CDATA[ Instagram has become a massively popular social media platform over the last several years. People all over the world use it to share photos, spread messages, and inspire each other. According to TechCrunch, Instagram has over 1 billion active users ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/</link>
                <guid isPermaLink="false">66b1fa4deea9870582e16bda</guid>
                
                    <category>
                        <![CDATA[ how-to ]]>
                    </category>
                
                    <category>
                        <![CDATA[ instagram ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Abigail Rennemeyer ]]>
                </dc:creator>
                <pubDate>Thu, 15 Oct 2020 15:26:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9833740569d1a4ca18bb.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Instagram has become a massively popular social media platform over the last several years. People all over the world use it to share photos, spread messages, and inspire each other.</p>
<p><a target="_blank" href="https://www.oberlo.com/blog/instagram-stats-every-marketer-should-know#:~:text=More%20than%20500%20million%20active,most%20popular%20social%20networks%20worldwide.">According to TechCrunch</a>, Instagram has over 1 billion active users (with 500 million posting every day) – so if you want to get your images or your ideas out there, it's a good place to start.</p>
<p>In this tutorial, we'll cover some Instagram basics – what it is, how to set up an account, how to add posts, captions, and hashtags, and so on. </p>
<p>Then we'll look at how you can up your Instagram game with filters, stories, and more.</p>
<h2 id="heading-what-well-cover-in-this-guide">What we'll cover in this guide:</h2>
<ol>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/#what-is-instagram">What is Instagram?</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/#why-should-you-use-instagram">Why should you use Instagram?</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/#how-do-you-sign-up-for-instagram">How do you sign up for Instagram?</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/#how-to-use-instagram-the-basics">How to use Instagram – the basics</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/#how-to-use-instagram-like-a-pro">How to use Instagram like a pro</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/#instagram-etiquette-some-do-s-and-don-ts-of-posting">Instagram Etiquette</a></li>
</ol>
<h2 id="heading-what-is-instagram">What is Instagram?</h2>
<p>Instagram is a social media platform where people share photos, videos, art, and infographics – really anything visual is fair game. </p>
<p>The photos get posted to a feed which you can scroll through (what feels like endlessly). Along with the photos, you can add a caption and some hashtags (more on those below) to provide more info about your image.</p>
<p>As opposed to other social media sites like Twitter and Facebook, Instagram has traditionally been more focused on visual media and art, and less on textual media. </p>
<p>But recently, text has been appearing more and more as people share important social and political messages through Instagram.</p>
<h2 id="heading-why-should-you-use-instagram">Why should you use Instagram?</h2>
<p>There are many reasons you might want to share photos and videos on Instagram.</p>
<p>Perhaps you're starting a business or launching a product. You might work for a company that wants to have an Instagram presence. Maybe you want to build your personal brand as a photographer, traveler, or artist. Or you just want to share what you're into right now via pictures.</p>
<p>Whatever the reason, Instagram is a great place to share ideas, messaging, and art online.</p>
<p>Some of the main benefits of using Instagram are: </p>
<ul>
<li>It's free to use</li>
<li>Hundreds of millions of people use it every day – so you have a huge potential audience</li>
<li>It can help increase exposure for your site, product, service, or tool</li>
<li>You can get inspiration and ideas from others' posts (just always be sure to give credit if you use/share their work!)</li>
<li>You can share what you've learned through infographics</li>
<li>You can use it to amplify others' voices</li>
<li>It's generally a very positive atmosphere (and the owner of an account can remove negative/nasty comments if they appear)</li>
</ul>
<h2 id="heading-how-do-you-sign-up-for-instagram">How do you sign up for Instagram?</h2>
<p>Before you can post anything to Instagram, you have to have an Instagram account. It's not difficult to set up, and we'll go through the steps quickly here.</p>
<p>Just a quick note before we get started: Instagram's desktop interface and mobile app are quite different. Most people use Instagram on their mobile device (from the Instagram app) because that's where you can actually post photos.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_7278.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Instagram for Mobile</em></p>
<p>You can't post to Instagram from your desktop – you can just scroll, follow people, search, and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-desktop-home-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Instagram for Desktop</em></p>
<p>Now, we'll go through the instructions to set up your account on your mobile device. If you want to see how to do it on your desktop or laptop, just jump down to the "Bonus" section at the end of the article.</p>
<h3 id="heading-how-to-sign-up-for-instagram-on-your-phone">How to sign up for Instagram on your phone</h3>
<h4 id="heading-step-1-download-the-instagram-app">Step 1: download the Instagram app</h4>
<p>First, you'll need the app. Visit the app store and download it (it's free).</p>
<h4 id="heading-step-2-sign-up-for-instagram">Step 2: Sign up for Instagram</h4>
<p>Next, you'll need to create an account. Pick a username (you can change it later if you want) and a password. The app will automatically advance you to the next step once you've entered these values.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_7280.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Choose your Instagram username (and password in the next step).</em></p>
<h4 id="heading-step-3-add-a-profile-photo-and-other-info">Step 3: Add a profile photo and other info</h4>
<p>Once your account is set up, you'll want to add a profile photo. It doesn't have to be a photo of your face – but you should add something. No one wants to see that little grey person icon.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_7283.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Complete the steps to fill out your profile.</em></p>
<p>You can also add bio information, a website, and any other info you want people to know (as you see in the image above). Many people use this section to tell a bit about themselves, link to their personal sites, and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IMG_7284.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>An example profile.</em></p>
<p>Now that your profile is all set up, you're ready to start exploring and posting to Instagram. Let's dive into some of the features you'll find.</p>
<h2 id="heading-how-to-use-instagram-the-basics">How to Use Instagram – the Basics</h2>
<p>In order to get the most out of your Instagram account, you should share some stuff. You don't have to share multiple times a day, or even every day – but you should share regularly.</p>
<p>Different people have different strategies about how often to post, what time of day, what days of the week, and so on. </p>
<p>If you're running a branded/company account, or you're trying to grow your following and eventually make money off of sponsorships and so on, this will be more important for you.</p>
<p>If you're just trying to have a personal account where you can share photos of your pets and amplify others' voices, it's really just up to you to find what works best.</p>
<p>Now, let's get into some of the little buttons and icons you'll see on your home screen and learn more about what you can actually do on Instagram.</p>
<p><strong>Note</strong>: from now on, I'll just be sharing info and screenshots from the mobile app, since that's likely how you'll be using the site.</p>
<h3 id="heading-how-to-search-on-instagram">How to Search on Instagram</h3>
<p>When you're just getting started on Instagram, search is an important feature. You'll find the search icon on the bottom of your screen, towards the left:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-home-screen-search-button.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Magnifying glass = search icon (on home screen).</em></p>
<p>If you click on the little magnifying glass icon, you'll be taken to the search page. It shows a search bar at the top, and a number of popular accounts (photos and videos) below, like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-search-bar.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>You can search for people by name or Username.</em></p>
<p>If you have a specific person in mind you want to find, enter their name (or their Instagram username, if you know it) into the search bar. When you find them, you can click "Follow" to get updates from their account in your feed.</p>
<p>If you just want to browse around and follow interesting-looking people, you can do that too on the search page.</p>
<h3 id="heading-how-to-find-the-instagram-homepage-feed">How to find the Instagram homepage (feed)</h3>
<p>When you open your Instagram app, it'll take you to the home page. Or, if you have already browsed around and visited another page (like your activity), it'll take you there.</p>
<p>To find your home page, look at the menu bar with the five icons along the bottom of the screen. You can get home by tapping the little house icon:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-home-button-home-screen.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Just tap the little house to get home (in this image, you're already there – so it's highlighted).</em></p>
<p>Once you're there, you can scroll down to see what people have been sharing. On each post, you can like it (tap the heart icon), comment (tap the speech bubble icon), send the person a message (tap the little paper airplane or message bubble looking icon) or save the post for later (the little flag icon on the right). </p>
<p>I'll discuss how to use these features in more detail below.</p>
<p>You'll also see recent stories on your home page as you scroll down. More on stories below. </p>
<p>Lastly, in the upper right corner, you'll see another copy of the message icon. If you click that icon, you'll see messages people have sent you, and you can send messages from there to other Instagram users. More on that below as well.</p>
<p><strong>October, 2020 Update: If you've updated your Instagram app, you might see a new homescreen, that looks like this:</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Home-page-update.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Updated homescreen.</em></p>
<p>You'll see that your activity button (the heart) and search button (the magnifying glass) are now in the upper right next to the messaging button.</p>
<p>Along the bottom of your homescreen, you'll now find the home button (same), a Reels shortcut (looks like a movie action button), the add photo button (same), a "Shop" button (looks like a shopping bag) and your profile icon (same).</p>
<p>The shopping tab is the only really new thing here. Instagram recommends products for you and you can shop directly on that page.</p>
<h3 id="heading-how-to-add-a-photo-or-video-on-instagram">How to add a photo or video on Instagram</h3>
<p>Alright, so you've been scrolling through other people's content, but now you probably want to add your own.</p>
<h4 id="heading-step-1-select-the-photos-you-want-to-share">Step 1: Select the photo(s) you want to share</h4>
<p>To add a photo or video, click on the plus (+) icon in the bottom middle of your home screen. Your camera roll will pop up, with the last photo you took selected at the top. You can scroll down to find older photos if you want.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-add-photo.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You'll also see three little icons in the middle/right of the page on that first photo. They look like an infinity symbol, a couple squares and a rectangle, and a couple layered squares. More on them below. Let's just focus on adding a photo for now.</p>
<p>Once you find the photo you want, just tap on it and a little blue outline will appear around it. </p>
<p>If you want to add more than one photo, tap the layered squares on the right and then you'll be able to select up to 10 photos. The photos will be displayed in the order you select them (and will be numbered).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-add-multiple-images.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Add more than one photo to your post.</em></p>
<h4 id="heading-step-2-add-a-filter-or-edit-your-photos-if-you-want">Step 2: Add a filter or edit your photo(s) (if you want)</h4>
<p>Once you've selected your photo(s), hit "Next" in the upper right corner of your screen. You'll then have the option to select a filter – they appear along the bottom below the photo and show you a little preview of what the filter would look like. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-filters.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Filter options (scroll to the right to see more). Tap each option to see a preview.</em></p>
<p>If you tap one of the filter options, the main/large photo above will change to show what that filter will do to the photo. You can also leave the photo without a filter if you like it the way it is.</p>
<p>If you'd like to customize and edit the photo in more detail, just select the "Edit" button (to the right of the "Filter" option). </p>
<p>A new scrollable menu will appear below your photo with options to adjust brightness, contrast, and a number of other visual features. Click on each one to play around with the settings until your photo looks just right.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-photo-edit-options-1.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Scroll through the options. Click on each, and drag the toggle left and right to adjust the photo.</em></p>
<h4 id="heading-step-3-add-text-hashtags-and-location-to-your-post">Step 3: Add text, hashtags, and location to your post</h4>
<p>When you're done editing, click "Next" in the upper right corner. You'll be taken to the final screen where you can add a caption, hashtags, and a location. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-post-photo.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Add all the important info here.</em></p>
<p>First, add your text (if you want there to be text). Then, add your hashtags. To create a hashtag, simply use the hash/pound sigh/number sign (#) followed by a word, like #technology. No space.</p>
<p>When you create the hashtag, Instagram will provide a list of hashtags that match. For example, if I started typing #tech, then various related hashtags will come up, like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-add-hashtags.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Pick from any of the related hashtags, or create your own.</em></p>
<p>Tap on the hashtag you'd like to use. You can include lots of hashtags if you want –just leave a space between each one.</p>
<p>A few tips for adding text and hashtags:</p>
<ul>
<li>If you want to create spaces between paragraphs, you'll need to add/type a character in that space, otherwise Instagram will collapse it. So, after you've typed a sentence/a few words and want a space and new paragraph, hit enter, then add a period (.) then hit enter again. The period maintains the space (as you can see in the image above).</li>
<li>If you want to make your captions/text more readable, consider breaking them up into multiple small paragraphs.</li>
<li>Most people add hashtags at the end, after their caption. You can just add hashtags with no other text if you want. You can also add emoji.</li>
<li>Make sure your hashtags are relevant to the photo/message you're sharing. Their purpose is to help people find the types of photos/subjects they're searching for.</li>
</ul>
<p>If anyone is in your photo with you – or you want to make sure someone gets notified of your post – you can tag them. You'll see a "Tag People" option below the text space. Just click that and then tap on the photo to add their Instagram handle.</p>
<p>Another way to mention someone is to tag or @mention them in the text of your post. So, for example, you could say "Studying JavaScript on @freecodecamp today" – and that would let freeCodeCamp know you've mentioned them.</p>
<p>You can also tag people directly in the photo after you've posted it. Just tap the three dots to the upper right of the photo (more on those below) and click edit. Then you'll see an option to tag people on the left:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-tag-people.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>You can tag people in the photo directly, too.</em></p>
<p>You can also add alt text to make your images more accessible.</p>
<p>Lastly, you can add a location if you want. Just click the "Add location" button below the text/tagging section. </p>
<p>Instagram will likely suggest nearby places, so you can choose one of those if you see your location. Otherwise you can hit the little right arrow to search for a specific spot.</p>
<h4 id="heading-step-4-share-and-view-your-creation">Step 4: Share (and view) your creation!</h4>
<p>Once you're done composing your text and adding hashtags, you're ready to share your photo.</p>
<p>Just hit the "Share" button in the upper right corner and watch the photo go live. It'll appear on your homepage once it's posted. You can also see it by clicking on your profile – all your posts are visible there.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-posts-on-home-page.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-up-your-photo-sharing-game-with-boomerang-and-layout">How to up your photo sharing game with Boomerang and Layout</h3>
<p>Maybe you don't just want to share a regular photo. You want some cool animation or you want to create a collage. Don't worry – Instagram lets you do that with Boomerang and Layout.</p>
<h4 id="heading-how-to-use-boomerang">How to use Boomerang</h4>
<p>Boomerang is a fun and more interactive way to share images. It's short, so people can view and get the whole experience in just a few seconds. And it's eye-catching and engaging, since it moves.</p>
<p>Ok, so how do you use Boomerang? When you're selecting your photos to share, you'll see those three symbols I mentioned earlier (the infinity symbol, the little collage of squares/a rectangle, and the layered squares). We'll get into those first two now.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-add-photo-1.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>See the infinity symbol and collage symbol to its right? Those are Boomerang and Layout, respectively.</em></p>
<p>The infinity symbol brings up the boomerang effect. It makes little video clips move back and forth on a loop, hence the "boomerang" name. </p>
<p>If you want to use this effect, just install boomerang (it'll take you to the app store - click "Install", it's free) and then go back to Instagram.</p>
<p>Click the infinity symbol, and you'll get a quick Boomerang tutorial (if it's your first time using the app). Here's the basic interface:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Boomerang.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>To summarize the Boomerang process: take a short video of something that's moving – like a couple of your friends waving – by clicking the round white button. To do this, you'll actually be capturing a burst of photos (just for a couple seconds). Instagram will turn it into a loop for you.</p>
<p>Once you take your little burst of photos, you'll have the option to share it to Instagram, Facebook, or other social apps.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Boomerang-next.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Choose Instagram, Facebook, or other apps. Or you can just save the Boomerang by clicking "Next" (upper right).</em></p>
<p>You can choose one of those, and Boomerang will take you back to the app so you can post your Boomerang (see process above). Or you can just click "Next" in the upper right corner. This will save your Boomerang to your photos so you can post it at your leisure.</p>
<h4 id="heading-how-to-use-layout">How to use Layout</h4>
<p>Now, what about Layout? Let's say you want to maximize the impact of one single image on Instagram. You want to share multiple photos, but don't want people to have to scroll through. Then Layout is for you.</p>
<p>If you click the Layout icon, you'll also be taken to the app store. Just get it, it's free. Then go back to Instagram.</p>
<p>When you click on the layout icon now, it'll take you to your photos. Just select a few of them, and then choose one of the layout options Instagram gives you above the photos. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Choose-a-layout.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>When you select your photos, they'll automatically appear in the layout options above.</em></p>
<p>You'll see your layout options above the photos. Layout will automatically put your selected photos into these layout options.</p>
<p><strong>Tip</strong>: If you want more granular options, just select the "Recent" tab at the bottom of the screen (with the little arrow) and it'll bring up various groupings of images (like "Recents", "Favorites", "Live Photos" and so on).</p>
<p>Anyway, now scroll to the right until you see the layout you like. </p>
<p>Once you click on your favorite arrangement, you'll be able to customize it. You can:</p>
<ul>
<li>Drag each photo left/right and up/down to resize it</li>
<li>Flip or mirror photos to change their orientation</li>
<li>Add borders for visual effect or to create more separation between photos</li>
<li>Replace any of the photos in the layout with another if you find a better fit</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Layout-options.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Layout customization options.</em></p>
<p>Once you're happy with your cool amalgamation, just click "Save", and then you'll be able to post your collage like any other photo.</p>
<p><strong>Tip</strong>: Boomerang and Layout are technically separate apps that will just post to your Instagram account. So if you're in either app and want to get back to Instagram, just double-tap your home button (or get back to your home screen however you do that) and revisit Instagram.</p>
<h3 id="heading-how-to-save-posts-on-instagram">How to save posts on Instagram</h3>
<p>If you want to save someone's post – maybe they're sharing a yummy recipe you want to try, or a particularly helpful coding tip – there's an easy way to do that.</p>
<p>Just click the little flag icon under the photo:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Save-post.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Click that flag icon, and the post will be saved.</em></p>
<p>And the post will join your saved posts. To access them, just click the little hamburger menu in the upper right of your profile page, and you'll see them there.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Saved-items-find-them.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>How to find your saved items (on your profile page, under the hamburger menu).</em></p>
<h3 id="heading-how-to-comment-on-a-photo-or-manage-comments-on-yours">How to comment on a photo (or manage comments on yours)</h3>
<p>Sometimes you might want to leave a comment for someone on their post. It's easy to do – you just tap the little speech bubble icon (between the heart and the message icon) below the photo.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-comment.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Click the little speech bubble icon below the photo to comment.</em></p>
<p>You'll type in your text (you can include emoji, too), and then click "Post".</p>
<p>You can also like people's comments or respond to them, either on comments on your posts or on others' posts. To like a comment, tap the heart icon next to the comment. To reply, just tap "Reply" below the comment.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Reply-to-comment-1.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>When you tap "Reply", it'll @mention the person whose comment it is (but you can delete that if you want).</em></p>
<p>Finally, if you see a negative or nasty comment on one of your posts, you can remove it. Simply swipe from right to left (from the edge of your phone's screen) and options will come up to pin, report, or delete the comment.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Delete-a-comment.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Swipe left from the edge of your phone screen (next to the comment), then select the delete icon.</em></p>
<p><strong>Note</strong>: You can only delete a comment if you're the owner of the account. If you're not the owner, you can still report the comment by selecting the little speech bubble with the exclamation point in it.</p>
<h3 id="heading-how-to-edit-or-delete-a-post-on-instagram">How to edit or delete a post on Instagram</h3>
<p>Maybe you forgot to @mention someone. Maybe you came up with better wording. Or maybe you just really need to remove a post. You can do all that and more.</p>
<p>Just find the three horizontal dots at the top of your post (upper right, opposite your name) and click them. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/How-to-edit-a-post.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Click those three little dots above/to the right of the photo.</em></p>
<p>You'll see a whole lot of options, like "Delete," "Turn Off Commenting," "Edit," and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Edit-options.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>All the options that come up from those three little dots.</em></p>
<p>Click any one of those buttons to perform the action you need to perform.</p>
<p>If you want to edit, for example, just click "Edit" and it'll take you to your post in draft mode, so to speak. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Edit-a-post-3.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>You can edit your text, hashtags, location, add tags, and add alt text. You can't change the photo(s).</em></p>
<p>Then click into where you want to edit (your hashtags, the text, and so on) and make your changes. You can't add or remove images, but the text is changeable.</p>
<h3 id="heading-how-to-see-your-accounts-activity-on-instagram">How to see your account's activity on Instagram</h3>
<p>Notifications are a nice way to keep track of who's engaging with your posts and how they're doing it.</p>
<p>If you want to see who's liking your photos, following you, commenting on your photos, and otherwise interacting with your content, just visit your notifications.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Notifications.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Click the little heart to view your notifications.</em></p>
<p>You'll see a heart icon on the bottom menu. Click it and all your notifications will show up. You can follow people back, or click on the notification to be taken to their comment or profile, and so on.</p>
<p>Your notifications appear in reverse chronological order, from most recent to least recent.</p>
<h3 id="heading-how-to-findedit-your-profile-on-instagram">How to find/edit your profile on Instagram</h3>
<p>Sometimes you might want to update your profile photo or change the information you have in your profile.</p>
<p>To do that, simply click the profile photo in the bottom right of your screen and you'll be taken to your profile.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Profile.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Click your profile photo icon to visit your profile.</em></p>
<p>There you'll see how many posts you've made, how many people are following you, and how many people you're following. </p>
<p>You'll also see any stories you've saved ("Highlights"), the photos you've posted (under the 9-square grid icon, left) and the photos you've been tagged in (under the little person icon, right).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Profile-features.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Your profile contains a lot of features...check 'em out.</em></p>
<p>You'll also see a hamburger menu in the top right corner that contains all sorts of useful information (like your settings, archive, saved items, and more).</p>
<p>There's also a little plus (+) icon at the top left. Click that and you can post a photo, story, video, or reel right from there.</p>
<p>You can edit any of your info by clicking the big "Edit Profile" button in the center of your profile screen.</p>
<h2 id="heading-how-to-use-instagram-like-a-pro">How to Use Instagram Like a Pro</h2>
<p>If you want to go beyond basic posting and commenting, there are a number of ways you can engage with the app on a higher level.</p>
<h3 id="heading-how-to-share-other-peoples-photos-repost-on-your-instagram-account">How to share other people's photos (repost) on your Instagram account</h3>
<p>Instagram isn't like Twitter - you can't just share someone's photo by clicking a single button.</p>
<p>There are a couple ways to share someone else's photo. But before you do, it's a good idea to get permission from the person first. </p>
<p>To do this, you can simply send them a message on Instagram (or elsewhere if you know their Twitter handle, and so on) and ask if you can repost with credit.</p>
<p>You can also @mention them in the photo's comments and ask if you can repost.</p>
<p>Instagram's community guidelines recommend that you do this to avoid any copyright issues – so it's best to wait until you hear back before reposting.</p>
<p>Now, back to the methods: you can always screenshot the photo, crop out what you don't want, and then share that screen shot (with proper credit, of course).</p>
<p>But if you want to download the photo (better quality) it takes a couple extra steps. You can find a detailed overview <a target="_blank" href="https://www.freecodecamp.org/news/instagram-picture-download-guide/">in this excellent guide</a> (for desktop/laptop, not your mobile device).</p>
<p>There are also a number of free reposting apps, like <a target="_blank" href="http://repostapp.com/">Repost+</a> for iOS, or <a target="_blank" href="https://play.google.com/store/apps/details?id=com.kimcy929.repost&amp;hl=en_US&amp;gl=US">Regram</a> for Android. These also help you if you want to include the caption/hashtags from the original post (so you don't have to retype everything).</p>
<p>Again – always remember to seek permission and give credit when you share someone else's work.</p>
<h3 id="heading-how-to-send-messages-on-instagram">How to send messages on Instagram</h3>
<p>Let's say you find someone you know on Instagram and want to send them a message about their content, or about life in general. If you don't want to comment publicly on one of their posts, you can send them a private message directly.</p>
<p>From your home page, click on the little icon in the upper right corner of your screen (it'll either look like a paper airplane or a message bubble).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IG-messages.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When you do, you'll be taken to your messages. If you already have messages waiting for you, you can just click on one to read it and respond.</p>
<p>If you want to write a new message, tap the notepad/pencil icon in the upper right corner. You'll need to choose to whom you're sending it (you can search, or choose from the list of people you follow that pops up).</p>
<p>Once you select a person, you'll click "Chat" in the upper right corner and you'll be taken to the messaging screen. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/How-to-message.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>You can start a new convo or continue an old one.</em></p>
<p>If you want to continue a conversation, just click on the person's name in your list of conversations (as you can see above).</p>
<h3 id="heading-how-to-use-instagram-stories">How to use Instagram Stories</h3>
<p>Stories let you share photos and videos in a less permanent way. Any media you share there will stay for 24 hours before disappearing (unless you save it or share it to your feed).</p>
<p>So it's more like Snapchat, and lets you give your followers a quick glimpse at little moments in your life, quick messages you want to share, and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Stories-on-home-page-in-feed.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Recent stories will show up in your feed if you scroll down.</em></p>
<h4 id="heading-how-to-view-other-peoples-instagram-stories">How to view other people's Instagram stories</h4>
<p>To view stories, either scroll through your feed until you see some (like above), or select someone's story from the top of your home page.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Stories-top-of-feed.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Click on one of the users to see their recent stories. Scroll right for more.</em></p>
<p>If you just want to look at other people's stories, you can scroll through and browse them all. Or you can just click the "watch all" tab if you don't want to miss anything.</p>
<p>Once you click on a story, it'll scroll through however many story posts that person has made since you last checked (within the last 24 hours). Then, when you finish with their stories, it moves on to the next person's stories in the list.</p>
<p>If you want to scroll back and forth between one person's stories, or between different people (maybe you didn't get a good enough look at that last clip), just tap on the left and right of the screen to move between images/videos or people.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Navigate-stories.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>An example of someone's story.</em></p>
<p>To exit stories, just click the little X in the upper right corner.</p>
<h4 id="heading-how-to-create-your-own-instagram-stories">How to create your own Instagram stories</h4>
<p>To add your own stories to Instagram, go to the top of your home page. There, you'll see a "Your story" icon with your profile picture and a little "+" symbol on it. (To the right of your photo, you'll see other people who have recently shared stories.)</p>
<p>Click on your photo, and you'll be taken to the story interface. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Stories-interface.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>The stories interface.</em></p>
<p>When you first open it, it's set up to take a selfie. But you can flip the camera, or add photos or other content you already have on your phone. Just select the camera roll icon in the bottom left corner and it'll take you to your photos.</p>
<p>Select what you want to share (one or many images - there's a little "Select multiple" tab in the upper right corner if you want to share more than one thing) and you'll be taken to the customization screen (what you see above).</p>
<p>There, you can add text, markup the image, add effects, and more with the menu options on the top of the screen.</p>
<p><strong>Tip</strong>: if you swipe right or left from the sides of your screen, different filters will be applied to your image.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Add-effects-to-story.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>I added text, drew on it, and added the little heart effect (all from the menu at the top of the screen).</em></p>
<p>Once you've played around and made your image(s) or video(s) your own, just click the "Send to" button in the bottom right corner. You'll choose whether to show this story to everyone ("Your story"), just close friends, or certain people in particular.</p>
<p>Once you hit "Send", your story will be live for 24 hours.</p>
<p><strong>Note</strong>: if you want to update your Story settings (like who can see them, where you share them, and so on), just click the settings gear in the upper right on the Stories screen.</p>
<h3 id="heading-how-to-broadcast-live-on-instagram">How to broadcast live on Instagram</h3>
<p>If you want to share something the moment it's happening, Instagram offers a "Live" feature. It's sort of like broadcasting your life live on camera for the world to see.</p>
<p>To access it, click on the "Your Story" icon at the top of your home screen. At the bottom of the stories screen, you'll see three options: Live, Story (which will be highlighted), and Reels.</p>
<p>Click on "Live" and you'll be taken to the recording screen. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/IG-live.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Your Live recording screen - effects and options included.</em></p>
<p>You'll see all kinds of little options: a place to add text, filters you can use, and settings in the upper left corner. You can either record yourself, or flip the camera around to show what you're looking at instead (with the little arrows at the bottom right).</p>
<p>Once you hit the round record button (bottom center of screen), Instagram will check your connection and then start broadcasting. When you're done, just hit "End" in the upper right. You'll see the option to share the live video or delete it.</p>
<h3 id="heading-how-to-use-instagram-reels">How to use Instagram Reels</h3>
<p>Reels are just another way to share videos on Instagram – but these videos are short clips (around 15 seconds long) that loop when you play them.</p>
<p>To create a reel, just select the "Reel" option from the Stories screen. When you press the round play button it'll record for up to 15 seconds (you can stop it earlier if you want by pressing the play button again).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Reels-page.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Your Reels recording screen.</em></p>
<p><strong>Note</strong>: if you stop the reel before your 15 seconds are up, you'll see the editing/effects option on the left of the screen. If you let it go all 15 seconds, it'll start playing your clip on loop, and you won't see the effects.</p>
<p>To access the effects from there, just click the little back arrow in the upper left corner of the screen as your video loops. To just go ahead and post it, click the forward arrow in the bottom right.</p>
<p>When you hit that right arrow, and you'll see the option to "Share to Reels in Explore". You an also toggle on or off whether you want to share it to your feed, too. You can share it right away, or save it to a draft.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Share-reel.PNG" alt="Image" width="600" height="400" loading="lazy">
<em>Choose whether to save or share your Reel.</em></p>
<p>If you want to add effects (audio, play speeds, visual effects, a timer – that lets you select the part of your Reel to keep/share – and alignment options), just click on each and play around with them.</p>
<p>Once you're done touching up your Reel, click that right/next arrow to see a preview of your creation. When you're ready, click next again and you'll get the sharing options.</p>
<h2 id="heading-instagram-etiquette-some-dos-and-donts-of-posting">Instagram Etiquette – some do's and don'ts of posting</h2>
<h3 id="heading-do-give-credit-where-credit-is-due">Do give credit where credit is due</h3>
<p>Give credit if you want to share/repost someone else's image. Most people are happy to have their images, art, videos and so on shared by other people – as long as you give proper credit.</p>
<p>So how do you do that? As discussed above, reach out to the owner of the account via direct message and ask if you can repost their content (with credit). </p>
<p>If they say yes, make sure to @mention their account when you repost the content. It's as simple as typing the @ symbol followed by their account name. When you see it pop up, click on it and they'll be tagged. They'll get a notification that you've mentioned them.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Tagging-people.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If they say no, respect their wishes and just get personal inspiration from their posts.</p>
<p><strong>Note</strong>: some account owners will say something about reposts in their profile – so it's a good idea to check there first.</p>
<h3 id="heading-do-use-good-hashtags">Do use good hashtags</h3>
<p>Do use appropriate hashtags to help people find your posts. Keep your hashtags related to what you've shared, and don't just add popular hashtags to try to get your posts to show up in searches.</p>
<p>For example, if you're sharing an image of you coding at your laptop, some helpful hashtags might be #coding, #programming, #webdevelopment, #softwaredevelopment, #javascript, #developer, and so on. </p>
<p>Don't just throw #photooftheday or #photography on there...unless you're a photographer.</p>
<h3 id="heading-dont-spam-people-about-collabs-or-the-latest-money-making-scheme">Don't spam people about collabs or the latest money-making scheme</h3>
<p>You might see comments on photos like "X person helped me make thousands of dollars. I'm so grateful for their help. You can do it too!" or something strange and irrelevant like that.</p>
<p>If you see those comments on your photos, you can remove them.</p>
<p>You'll also likely see comments asking the account owner to do a collaboration with them. While this is ok if it's a serious inquiry, you shouldn't reach out to people unless whatever they're doing is a good fit for whatever you're doing. Spammy comments or messages aren't appreciated.</p>
<h3 id="heading-dont-be-mean">Don't be mean</h3>
<p>Instagram is a generally positive and supportive community. There are trolls, of course, like anywhere else, but don't be one of them.</p>
<p>If you have a judgey or negative comment or sentiment, keep it to yourself. </p>
<h2 id="heading-now-you-can-use-instagram-like-a-pro">Now you can use Instagram like a pro!</h2>
<p>Whether you just manage your personal account or share content for your company or employer, you should have the tools to make the most of Instagram and its many features.</p>
<p>Just keep in mind - there's more to the app than I've covered here. The best way to learn about Instagram is to play around with it. Click every icon, try out every effect. Learning by doing, right?</p>
<p>Happy 'Gramming!</p>
<h3 id="heading-bonus-how-to-sign-up-for-instagram-on-your-desktop-or-laptop">Bonus: How to sign up for Instagram on your desktop or laptop</h3>
<h4 id="heading-step-1-visit-instagramcom">Step 1: Visit instagram.com</h4>
<p>If you're on your desktop or a laptop, go to <a target="_blank" href="https://www.instagram.com/">instagram.com</a> where you'll find the following homepage:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/instagram-sign-in-page.png" alt="Image" width="600" height="400" loading="lazy">
<em>Instagram's homepage (if you're not signed in/don't have an account)</em></p>
<p>You'll see a few options. You can either: </p>
<ul>
<li>sign in (if you already have an account), </li>
<li>login with Facebook (Instagram is owned by Facebook, so they chose that social sign-in option), </li>
<li>or sign up if you don't have an account (towards the bottom).</li>
</ul>
<h4 id="heading-step-2-sign-up-for-an-account">Step 2: Sign up for an account</h4>
<p>If you don't have an account, click "Sign up". You'll be taken to the following screen:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/instagram-sign-up-page.png" alt="Image" width="600" height="400" loading="lazy">
<em>Sign in with Facebook, or sign up for an account</em></p>
<p>You'll notice you still have the option to sign in with Facebook. But if you don't want to do that, just fill out the requested info and hit "sign up".</p>
<p><strong>Some tips:</strong> </p>
<ul>
<li>You do need to use a real email or mobile number (as Instagram will send a confirmation code there that you'll need to sign up). You can use a "test" email if you want - like jane+test@heremail.com or jane+instagram@heremail.com (as long as your email is actually jane@heremail.com).</li>
<li>You don't have to use your full name if you don't want to – it can be your first name and last initial, or something else entirely.</li>
<li>Choose a username that reflects who you are, what you'll be sharing, and so on. It has to be unique, and Instagram will tell you (with a little checkmark) if the one you picked works.</li>
<li>Use a password generator to generate and save a secure password for you.</li>
</ul>
<h4 id="heading-step-3-enter-the-confirmation-code">Step 3: Enter the confirmation code</h4>
<p>Once you've hit "sign up", you'll be taken to the screen that requests the confirmation code, like the below:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/instagram-conf-code.png" alt="Image" width="600" height="400" loading="lazy">
<em>The code field will be blank - I've entered a sample code here :)</em></p>
<p>Check your email or mobile (whichever method you provided above) and enter the code sent there. Click Next.</p>
<h4 id="heading-step-4-follow-some-people-to-get-started">Step 4: Follow some people to get started</h4>
<p>Then you'll be taken to a page full of suggested people to follow:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Instagram-recommendations.png" alt="Image" width="600" height="400" loading="lazy">
<em>Instagram suggests some initial accounts for you to follow to get started. Pick a few and scroll down.</em></p>
<p>Pick a few (or at least one) from that list, click "Follow" and scroll all the way down. You'll see a blue "Get started" button at the bottom – click that. </p>
<h4 id="heading-step-5-finish-entering-your-info">Step 5: Finish entering your info</h4>
<p>Finally, you'll be taken to your home page, which will look something like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/instagram-home-page-setup.png" alt="Image" width="600" height="400" loading="lazy">
<em>Click through the "getting started" suggestions - most importantly, add a profile picture (scroll to the right with the little arrow).</em></p>
<p>Note that your homepage will look different depending on whom you followed in the previous step. </p>
<p>In the "Getting started" section towards the top, you can find friends on Facebook who are on Instagram, add more info, but most importantly – <strong>add a profile photo</strong>. </p>
<p>Remember, your profile photo doesn't have to be an actual photo of yourself, but it can be helpful if you want people to know who you are. </p>
<p>If you don't, you can add any photo you like. But definitely add something. </p>
<p>Once you've added your photo (and any other info), that "Getting started" section will go away and you'll just see your homepage.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ HEIC to JPG – How to Convert Images on a Mac ]]>
                </title>
                <description>
                    <![CDATA[ If you're an Apple user, chances are you've seen the .heic file extension on your photos. And you might wonder – what is this photo format, and why does Apple use it? In this article we'll discuss what HEIC is, how it's different from the JPG format,... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/heic-to-jpg-how-to-convert-images-on-a-mac/</link>
                <guid isPermaLink="false">66b1fa2e3c37998c256a1d23</guid>
                
                    <category>
                        <![CDATA[ Image Compression ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mac ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Abigail Rennemeyer ]]>
                </dc:creator>
                <pubDate>Mon, 28 Sep 2020 16:18:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9881740569d1a4ca1a71.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you're an Apple user, chances are you've seen the .heic file extension on your photos. And you might wonder – what is this photo format, and why does Apple use it?</p>
<p>In this article we'll discuss what HEIC is, how it's different from the JPG format, why Apple uses it, how to convert from HEIC to JPG, and more.</p>
<h2 id="heading-what-is-the-heic-file-format">What is the HEIC file format?</h2>
<p>Well, first of all, .heic is the file extension that appears on HEIF files/images. HEIF stands for High Efficiency Image Format, and it was adopted by Apple in 2017. </p>
<p>As you might be able to guess from its name, photos stored in this way are "more efficient". That is, they're smaller while still maintaining their quality.</p>
<p>HEIF isn't actually a format, per se. Rather, it's a container in which the photo is stored that uses advanced compression techniques to squish that photo down into about half the size of a JPG.</p>
<p>A quick note, in case you're wondering: HEIF is the standard, and HEIC is the format name Apple gave it :) So I'll refer to it as HEIC in this article for simplicity's sake.</p>
<h2 id="heading-the-differences-between-heic-and-jpg">The differences between HEIC and JPG</h2>
<p>There are several important differences between HEIC files and JPG files. You might be more familiar with JPG, because it's been around longer and everyone (on any device) can use and view them easily.</p>
<p>So let's break down the main differences between these two formats:</p>
<h3 id="heading-operating-system-support-for-heic-vs-jpg">Operating system support for HEIC vs JPG</h3>
<p>One of the limiting factors of HEIC is that it's only natively supported by Apple's operating system (iOS 11 and higher, and MacOS High Sierra and higher).</p>
<p>But don't worry – even though your iPhone takes photos in HEIC, if you have iOS 11 or MacOS Sierra and higher you can easily convert these photos to JPG (more on that below).</p>
<p>That way you can share them with whomever you want without worrying if your buddy will be able to open them on their Android phone, for example.</p>
<p>If you're a Windows or Android user, you can't simply open a HEIF should you find yourself in possession of one. You'll need to download an extension or program to help you deal with it.</p>
<h3 id="heading-size-and-quality-of-heic-vs-jpg-photos">Size and quality of HEIC vs JPG photos</h3>
<p>Another main difference is the size of the photos, as mentioned above. HEIC photos are extra compressed, basically, so that they end up being about half the size of their JPG counterparts.</p>
<p>Also, despite that extra compression, HEIC photos still maintain their quality (and will actually be higher quality than a JPG of the same size). So you can actually get a better, higher resolution HEIF photo that's the same size as a not-so-high-quality JPG. Pretty neat.</p>
<h3 id="heading-compatibility-of-heic-vs-jpg">Compatibility of HEIC vs JPG</h3>
<p>As you now already know, you can't just casually open a HEIC file if you don't have a Mac or iPhone. That's one of it's major downsides, and the reason Apple's OS converts HEIC photos to JPG when you download them or go to share them.</p>
<p>JPG files, on the other hand, are compatible with all operating systems and browsers. So you can open a JPG anywhere.</p>
<p>Until the rest of the world adopts the HEIC format, you'll have to convert to JPG if you want an easy photo opening/viewing experience.</p>
<h3 id="heading-format-details">Format details</h3>
<p>There are a couple other interesting differences between HEIC and JPG. </p>
<p>First of all, HEIC photos have 16-bit "deep color", whereas JPG only have 8-bit. So your HEIC photos can capture all those beautiful sunset nuances a lot better than JPG.</p>
<p>Second, HEIC files can store multiple images or bursts or live photos (in a single file), whereas JPG can only store one image per file. This gives HEIC more flexibility and allows it to store more types of photos (and more than one photo per file).</p>
<h2 id="heading-how-to-convert-heic-to-jpg-on-your-mac">How to convert HEIC to JPG on your Mac</h2>
<p>If your Mac is running High Sierra or later, you can convert HEIC images to JPG right in your photo Preview App.</p>
<p>Note: if you haven't updated your OS, you'll need to use an online converter.</p>
<p>But back to our process - here's how to convert those images in a few simple steps.</p>
<h3 id="heading-step-1-select-the-photo-you-want-to-convert-to-jpg">Step 1: Select the photo you want to convert to JPG</h3>
<p>First you need to open Finder and get to your HEIC photos. I just searched for "heic" in the search bar, but if you have a folder where you keep them you can go there.</p>
<p>Next, select the photo(s) you want to convert, and right click on it (two-finger click on your laptop's trackpad). That will bring up a little menu like you see below:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Finder-heic-image.png" alt="Image" width="600" height="400" loading="lazy">
<em>Right click on the image you want to convert</em></p>
<h3 id="heading-step-2-open-the-photo-with-the-preview-app">Step 2: Open the photo with the Preview App</h3>
<p>You'll select "Open with" (the second option for me) and then the default, "Preview" as you see in the image above.</p>
<p>Once you make those selections, it'll take you to the photo in the Preview App. </p>
<h3 id="heading-step-3-select-and-export-the-photo">Step 3: Select and export the photo</h3>
<p>Next, you need to choose "Edit" from Preview's menu bar, and then "Select All".</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Convert-HEIC-edit-settings-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Edit, then Select All</em></p>
<p>You'll see a little moving dashed line around the outside of the photo - this tells you your "select all" action worked.</p>
<p>Now, go back up to Preview's menu bar and select "File" and then "Export", like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/Export-HEIC-image.png" alt="Image" width="600" height="400" loading="lazy">
<em>You'll need to export your image - which then gives you the option to change formats.</em></p>
<h3 id="heading-step-4-convert-from-heic-to-jpg-format">Step 4: Convert from HEIC to JPG format</h3>
<p>Once you select "Export", you'll see the following box pop up:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/10/change-from-heic-to-jpeg.png" alt="Image" width="600" height="400" loading="lazy">
<em>Just change from HEIC to JPG and save and you're set!</em></p>
<p>You'll see that the "Format" is currently set to HEIC. Just click on HEIC and a little dropdown will show you all the other formats you can choose from (like in the image above). </p>
<p>Just select "JPG" instead and hit "Save". Then your photo will be converted into JPG! And you can confidently share away.</p>
<p>Just a quick note: you can also update where you want the photo saved. You can see in the image above that I have Desktop selected, but feel free to save to whatever location you like.</p>
<h2 id="heading-what-if-you-want-to-turn-heic-off">What if you want to turn HEIC off?</h2>
<p>So what if you don't want to deal with these steps and just want your phone to take JPG photos instead of HEIC?</p>
<p>You can do that by following these steps:</p>
<ol>
<li>Go to your iPhone's settings, and scroll down until you see "Camera" – select it</li>
<li>You'll see various settings, with "Formats" at the top – select it</li>
<li>You'll see two options, "High Efficiency" and "Most Compatible". It's likely set to "High Efficiency" by default (HEIC) so just change that to "Most Compatible" and that'll change it to JPG.</li>
</ol>
<p>And voilà, the photos you now take will be in JPG format.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Download Instagram Photos – Save Images to Your PC or Mac From Chrome With No Tools Necessary ]]>
                </title>
                <description>
                    <![CDATA[ Instagram makes it really hard to download photos to your computer without using their mobile app. But it is possible. This article will show you how to do this in 3 quick steps. Step 1: Find the Instagram photo you want to download. Go to instagram.... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/instagram-picture-download-guide/</link>
                <guid isPermaLink="false">66b8d466f583f6362a68ce0d</guid>
                
                    <category>
                        <![CDATA[ Google Chrome ]]>
                    </category>
                
                    <category>
                        <![CDATA[ instagram ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Mon, 23 Sep 2019 17:55:05 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9ca048740569d1a4ca47b4.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Instagram makes it really hard to download photos to your computer without using their mobile app. But it is possible.</p>
<p>This article will show you how to do this in 3 quick steps.</p>
<h2 id="heading-step-1-find-the-instagram-photo-you-want-to-download">Step 1: Find the Instagram photo you want to download.</h2>
<p>Go to instagram.com and find the specific photograph. Click on it.</p>
<p>This will bring the photo up in its preview modal, floating on top of the person's newsfeed, like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Ruben_A__Harris___rubenharris__-_Instagram_photos_and_videos.png" alt="Image" width="600" height="400" loading="lazy">
<em>Click the image you want to bring up its preview modal.</em></p>
<p>Notice that the URL in Chrome's address bar has changed. Instead of saying the person's Instagram username, it will now say <code>instagram.com/p/#########</code>. </p>
<p>Every photo on Instagram has its own dedicated web address, and if you go directly to that address, it will just show the one photo without all the other photos in their newsfeed.</p>
<p>Since the photo's address is now in the address bar, you can just refresh your browser by clicking the refresh button in your browser or using the control+r keyboard shortcut (command+r on Mac).</p>
<p>This will show you the photo's unique page on Instagram.</p>
<h2 id="heading-step-2-get-the-instagram-photos-url-so-you-can-download-it">Step 2: Get the Instagram photo's URL so you can download it</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Ruben_A__Harris_on_Instagram__-In_Tune_--__8_heroes__nanamaia_-.png" alt="Image" width="600" height="400" loading="lazy">
<em>Right click the image, then choose "inspect" from the dropdown.</em></p>
<p>Right-click the photo and choose "Inspect" from the dropdown. This will open up Chrome's developer console.</p>
<p>Even though Chrome DevTools are designed for software developers, don't be intimidated. You just need to click on a few specific buttons in order to find the photo.</p>
<p>First click on the "Sources" tab at the top.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Ruben_A__Harris_on_Instagram__-In_Tune_--__8_heroes__nanamaia_--1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Then click on the <code>VP</code> folder to expand its contents.</p>
<p>Each photo is stored within its own folder. Start expanding these folders and you'll eventually find the full-sized photo. Right click the file and click "open in new tab."</p>
<h2 id="heading-step-3-download-the-instagram-photo-to-your-computer">Step 3: Download the Instagram photo to your computer</h2>
<p>Now you can right-click the photo and choose the "save as" option.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/54204732_130744494725588_25369589837234553_n_jpg__1080-809_.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This way, you will get the full-sized Instagram photo - the same photo that Instagram shows you in the Instagram mobile app. This isn't a screenshot or a thumbnail - this is the full-sized image.</p>
<p>Congratulations! You got your image, and now you can do whatever you want with it.</p>
<h2 id="heading-why-does-instagram-make-it-so-hard-to-download-these-image">Why does Instagram make it so hard to download these image?</h2>
<p>Instagram wants for you to link back to their website instead of being able to link to the image directly. But Instagram doesn't own these images - you or whoever took the photo owns it.</p>
<p>It is ridiculous that Instagram doesn't just let you "right-click save as" the image like other websites (including freeCodeCamp.org) do.</p>
<p>But that's what attention-greedy social media platforms do - they make it inconvenient to just download your image. They override your browser's functionality using JavaScript.</p>
<p>Anyway, now you can download these images. It takes a bit of work, but once you get the hang of it, you won't have to link directly to Instagram or use some screenshot tool to get these photos.</p>
<p>There are tools out there to download your Instagram photos in bulk. But if you're just trying to download a specific photo, this is the fastest way to do it. You don't need to install any tools or Chrome extensions.</p>
<p>And remember - if you didn't take these photos, be sure to credit the photographer. Shout out to <a target="_blank" href="https://www.instagram.com/rubenharris/?hl=en">@RubenHarris</a> for being my subject in this tutorial.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to manage colors in your images and videos: latest trends and best practices ]]>
                </title>
                <description>
                    <![CDATA[ By Anton Garcia Diaz During the last world football cup, few people knew that only the flags of Argentina and France out of the top 10 teams could be accurately displayed on a standard HDTV. All the remaining flags colors were clearly out of gamut. T... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/color-management-for-the-web-the-challenges-from-iphone-to-chrome-b07cb44ad21b/</link>
                <guid isPermaLink="false">66d45d9aa44b8bb91150f651</guid>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UX ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 25 Jan 2019 18:15:07 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*UQygvO5FoRqMZuzlPO_4yg.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Anton Garcia Diaz</p>
<p>During the last world football cup, few people knew that only the flags of Argentina and France out of the top 10 teams could be accurately displayed on a standard HDTV. All the remaining flags colors were clearly <a target="_blank" href="https://dot-color.com/2018/06/14/2018-world-cup-watching-in-4k-hdr-makes-a-difference/">out of gamut</a>. That is, standard displays were not capable of reproducing the colors properly. Only those fans using wide gamut sets could see their colors in a 4K HDR broadcast.</p>
<p>As for a web workflow, it is much more involved than the display properties. Textures, saturation, hue or brightness may be far more important in other industries than in football — just think of fashion or the art imagery in ecommerce. In such cases, clean color management is key to deploying healthy and reliable image and video processing and optimization pipelines.</p>
<p>However, color management in ecommerce and in general in web workflows may unfold as a tricky issue. My recent experience with complex ecommerce teams involving photographers, retouchers and devops to debug and deploy <a target="_blank" href="https://abraia.me">image and video optimization</a> solutions only reinforces this idea.</p>
<p>In this article, I shortly revise the basic concepts involved in color management, the best practices, and the challenges posed by the latest trends in display technology.</p>
<h3 id="heading-color-in-the-human-eye">Color in the human eye</h3>
<p>Humans with healthy color vision have three types of color detectors in the retina. Each of these types of detectors respond with different strengths to spectral colors, from red to violet. As a result, any physical color that we perceive can be represented as the combination of three chromatic primaries.</p>
<p>This fact allowed us — nearly 90 years ago — to define the first <a target="_blank" href="https://medium.com/hipster-color-science/a-beginners-guide-to-colorimetry-401f1830b65a">colorimetry</a> standard to convert the physical magnitudes of light into a numeric representation uniquely related to colors. It set the basis to accurately represent any color (of light reaching the eye) by a simple array of three numbers.</p>
<h3 id="heading-cameras-and-displays">Cameras and displays</h3>
<p>Digital cameras and displays were designed to convey images of scenes that a human eye is able to see as if it were right there looking at them. So, cameras capture a trichromatic representation of the scene and code it in a digital file.</p>
<p>To do this, cameras <em>simply</em> :) have three types of light detectors (R, G, and B) like our retina has. Likewise, displays transform digital values in trichromatic signals that drive the generation of light to recreate the image stored in a digital file. To do it, displays <em>simply</em> :) have three types of light emitters (R, G and B).</p>
<p>It seems easy: The camera mimics the eye and the display projects light to mimic the scene, finally conveying it to the eye, anytime, anywhere.</p>
<p>But there are…</p>
<h3 id="heading-some-fundamental-problems">Some fundamental problems</h3>
<p>Some related to the physics and some related to perception.</p>
<h4 id="heading-need-to-calibrate">Need to calibrate</h4>
<p>Just to start with, the spectral sensitivities of the three detectors of a camera sensor are different — very different indeed — from our eye’s light detectors (our eye’s detectors are not R, G, and B). Moreover, different camera sensors exhibit quite different behaviors (their R, G, and B are different). Color perception is clearly non-linear with physical magnitudes like the intensity of light. But sensors are typically linear with light intensity.</p>
<p>In the end, this means that to provide accurate color representations, cameras should be calibrated. Calibration is done by shooting an image of a pattern of colors. A color profile is then created that transforms the sensor response into a standard representation of color. But this should be done for different lighting.</p>
<p>Put in simple words, if we seek true color fidelity we would need to calibrate to correct color for each new scene! And any slight change of lighting means that the scene has changed as well. Fortunately, depending on the specific need of accuracy and the flexibility of the workflow, <a target="_blank" href="https://www.dpreview.com/articles/6497352654/get-more-accurate-color-with-camera-calibration-">the requirements of calibration can be relaxed</a>.</p>
<p>Something similar happens to displays, but the other way. They translate the colors coded within image files into light emitted. Slight changes in the amount of light emitted have an impact on the color effectively displayed.</p>
<p>That’s why professional displays need to be calibrated from time to time. The light emitted for some primaries is checked and a display color profile is created. This profile is used to transform the stored pixel values to actual light with the intended color. Needless to say, user displays are not calibrated, but they usually have a factory color profile instead.</p>
<p>We should acknowledge that current LED technology has greatly limited the variation of color properties among different units of the same display model and also in the same display through time.</p>
<h4 id="heading-still-perception-tricks">Still… perception tricks</h4>
<p>If all this were not enough, our brain excels in assuring color constancy under different lighting conditions. To do it, a variety of mechanisms are constantly adjusting perception in order to match the expected color based on the scene context. This is done regardless true values of the physical color. You may pick the digital RGB values in A and B in this classic illusion (check the <a target="_blank" href="https://upload.wikimedia.org/wikipedia/commons/b/be/Checker_shadow_illusion.svg">original here</a>, since Medium alters the image).</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/XO28ZzoXDgz4FUWSHEBWssaOUkvX8GyGqbeO" alt="Image" width="520" height="395" loading="lazy">
_[color constancy](http://illusionoftheyear.com/cat/top-10-finalists/2018/" rel="noopener" target="_blank" title=""&gt;Our brain tricks our perception to ensure &lt;a href="https://en.wikipedia.org/wiki/Color_constancy" rel="noopener" target="<em>blank" title=") under variable lighting conditions</em></p>
<p>They are exactly the same: The display sends the same light from each of them. Even after knowing so, you will see A darker than B. I see it as I’m writing this. Such a tricky perception is a powerful reason for many photographers to adjust colors by hand rather than using a calibrated scene reference.</p>
<h3 id="heading-color-management">Color management</h3>
<p>However, things may still get worse, much worse. At this point, we should have noticed that speaking about color with the same language is important if we want to keep consistent. To accomplish this need, we should manage color. In other words, our software should be color managed. A failure to manage color in a web workflow will undermine the consistency of the user experience.</p>
<p>With this aim, different color spaces have been developed. Each color space aims to support a use case in the best possible way. Three examples of use cases are:</p>
<ul>
<li>average display technology</li>
<li>printing of photos</li>
<li>4K HDR video and cinema</li>
</ul>
<p>Each color space has an associated color profile to interpret the stored RGB values in a file. There are many handy tools out there to check the color space of an image. For instance, the inspector tool of Preview in Mac.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/WnGZ7G3v-sUnTyioaxdeNRrOvAIVlZgL7taJ" alt="Image" width="732" height="590" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/JroDDhekpFIYRUbaredfEjut6AGSFsz24TC4" alt="Image" width="732" height="590" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/uh48YMtViR-W8UyPEFWC9GNsM8M8PYBewim4" alt="Image" width="732" height="590" loading="lazy">
<em>Three examples of color profiles shown in Preview: one with an undefined color profile, other with the color profile of an iMac display, and one more with an sRGB color profile</em></p>
<p>To check every detail about an image, I find it very convenient to use <em>exiftool.</em> It reveals the color profile, among many other metadata.</p>
<pre><code>exiftool test.jpg
</code></pre><p>You should see something like this</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/3jYcqsOx82Z31YuOaoa10s68L7kKUwYYBnqI" alt="Image" width="800" height="521" loading="lazy">
<em>Fragment of exif data of an image coded in the sRGB color space</em></p>
<p>With videos, Mediainfo is a handy tool with a simple and usable graphic interface. Putting the pointer over the <em>Video</em> area, detailed metadata of the video appears, including the color space at the bottom.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/2YEAbslcKDEP4MmjjGrPSxKsuvwjFDt9s9hX" alt="Image" width="800" height="500" loading="lazy">
<em>Capture of Mediainfo window with information on color profile highlighted in red</em></p>
<h4 id="heading-classic-color-profiles">Classic Color profiles</h4>
<p><strong>sRGB: based on Rec. 709</strong></p>
<p>Created by HP and Microsoft, this color space was specially aimed at the Internet. It is based on BT.709 (or Rec 709) standard for video, adding gamma suited to CRT displays. But it’s also suited to average human perception. This means that it makes an efficient use of the dynamic range.</p>
<p>This is the color space <a target="_blank" href="https://www.w3.org/Graphics/Color/sRGB.html">universally supported</a> throughout the web. Any image (or web element) without an explicit color profile (that is an undefined color space) will be interpreted by any web browser as being sRGB. Moreover, any decent display is sRGB capable: it can reproduce the whole sRGB color gamut. At the time of this writing, this is the safest color space in a web context.</p>
<p>If you assure that ALL your workflow, from studio to web delivery, is (well) done in sRGB, then the colors of the images in your web will be consistent for everybody. You may be confident of this.</p>
<p>In case you find a non sRGB image and you need a quick fix, <a target="_blank" href="http://www.littlecms.com/">Little CMS</a> is a handy tool to get the job done. Whatever color profile has the image, you may convert it to sRGB by simply using</p>
<pre><code>jpegicc -q100 input.jpg output.jpg
</code></pre><p>However, remember that the best practice is working from the beginning in sRGB. When transforming from a wider space, out of gamut colors may be treated differently — and in some cases colors may be clipped while in other cases they may be washed out. It depends on the <a target="_blank" href="http://www.johnpaulcaponigro.com/blog/6088/rendering-intents-compared/">rendering intent</a>.</p>
<p>The inconvenience of sRGB is that your gamut will be more limited than a good percentage of current display technology, with this percentage increasing steadily. Recall the beginning of this article. Unless you are French or Argentinian, chances are that you won’t see your country colors properly in a standard sRGB monitor. Or in other contexts, everybody buying cloths online is deciding purchases based on untrue colors (shown on uncalibrated displays!). But if the web sticks to sRGB, the mismatch experienced by each user will be at least consistent, limiting the chance of bad surprises.</p>
<p><strong>Adobe RGB</strong></p>
<p>It is the classic color space used in the graphics industry. It has a wider gamut than sRGB and covers fairly the gamut relevant in the production of prints. To work with it, you will need a profesional calibrated wide gamut display capable of Adobe RGB.</p>
<p>Unless images are intended to be printed rather than viewed in a display, this color profile does not make sense in a web workflow. I include it here because I have found it several times in such a context.</p>
<p>Since it is the preferred color space of photographers and retouchers that print their work, some people think of it as implying higher quality than sRGB. Adjusting color in a color space and saving the image in a different one may end up being a waste of time and bringing unexpected results, specially in the presence of highly saturated tones.</p>
<p>If you are asked to optimise pristine images with this color profile you are likely facing upstream issues coming from the retouching or studio teams. Problems may be even worse if you find Adobe ProPhoto, with an even larger gamut.</p>
<h4 id="heading-new-wide-gamut-color-spaces">New wide gamut color spaces</h4>
<p><strong>DCI-P3 (or simply P3).</strong></p>
<p>This color space has been adopted by Apple in their wide gamut displays since 2016. Other brands recently embracing wide gamut have <a target="_blank" href="https://gizmodo.com/why-every-smartphone-screen-looks-different-1820748943">also adopted P3</a>. Although with a similar size to Adobe RGB, it spans a different gamut, better suited to displays — light projection technology — instead of prints. It is an intermediate step towards UHDTV, aimed at 8k TV and film industry. It is good for high quality streaming that may cater to 4K HDR capable displays.</p>
<p>The use of P3 results in much richer and deeper colors, with a true impact on user experience and color fidelity. Back to the world cup example, P3 would greatly improve the color fidelity and deliver true colors for most fans. It’s easy to think about a similar benefit for imagery in a fashion, cooking or traveling websites.</p>
<p><strong>UHDTV /Rec. 2020</strong></p>
<p>This color space has been designed for 4k and 8k HDR TVs. It brings a wider gamut compared to P3. It contains P3 as well. Even for HDR TVs this standard is <a target="_blank" href="https://www.rtings.com/tv/tests/picture-quality/color-volume-hdr-dci-p3-and-rec-2020">still the future</a>. It does not make much sense in a today’s web workflow.</p>
<h4 id="heading-comparing-gamuts"><strong>Comparing gamuts</strong></h4>
<p>If you own a wide gamut display and enjoy healthy color vision, a first hand visual check is the best and quickest way to understand and assess the differences among color profiles. A good starting point is to use wide gamut images specially prepared to <a target="_blank" href="https://webkit.org/blog-files/color-gamut/comparison.html">compare color spaces</a>.</p>
<h3 id="heading-good-practices-with-color">Good practices with color</h3>
<p>Unless you are determined to be a wide gamut pioneer, color management will be synonym of enforcing the sRGB color space throughout the image processing pipeline.</p>
<p>A good practice is to calibrate the camera at least with a <a target="_blank" href="http://blog.xritephoto.com/2010/05/x-rite-colorchecker-passport-dual-illuminant-profiles-part-1/">dual illuminant calibration</a>. Of course, the use of specific calibrations for specific lighting will always be better. In the studio, the more fixed your lighting settings are (so you don’t need to recalibrate), the better. If you directly shoot jpegs in sRGB instead of RAW, your calibration should be done in sRGB.</p>
<p>When iPhones are used to shoot, the color space may be an issue since <a target="_blank" href="https://photo.stackexchange.com/questions/98792/which-color-space-is-used-by-my-iphone-8-photos">iPhone cameras are set to DCI-P3 by default</a>.</p>
<p>Just after shooting, any color correction in darkroom software should be already done in sRGB. Retouching should be done in sRGB. You will avoid issues related to rendering intent choice. The same applies to artwork and visual creativities.</p>
<p>The software used should be color managed. This is the case of most image editing and graphics packages. In the case of video, there was a notable exception: Adobe Premiere Pro versions prior to October 2018 <a target="_blank" href="https://premierepro.net/color-management-premiere-pro/">did not manage color</a>.</p>
<p>If Premiere is used in post-production for web, the best practice is using a calibrated sRGB display. Otherwise, you may end up with video colors that will change (typically washed out) when viewed in the web. This is why so many Premiere users on iMAC displays usually oversaturate their videos, in order to avoid washed out exported results.</p>
<p>If the sRGB rule is observed, the only risks to color due to generation and optimization of derivatives will be <a target="_blank" href="https://abraia.me/docs/image-optimization/#jpeg-compression">compression artifacts</a> related to low q values or excessive chroma downsampling.</p>
<p>Don’t be fooled by old stuff posted saying that browsers are not color managed. It’s only the proof that being highly ranked in Google search is no guarantee of accurate and up to date information. All the major web browsers (from Safari, to Firefox, Edge, or Chrome) are currently color managed and capable of interpreting ICC profiles.</p>
<p>If you have many iOS and macOS users you may be tempted by the P3 color space. You would bring them a much more realistic experience, with far more vibrant colors.</p>
<p>But in 2019 it is still a risky move. All the other users with average sRGB displays may experience either washed out or oversaturated images. The impact will always depend on the specific picture and the browser, since browsers may use different <a target="_blank" href="http://www.johnpaulcaponigro.com/blog/6088/rendering-intents-compared/">rendering intents</a>. For instance in macOS — as of January 2019 — Chrome (version 71) and Safari (version 12) use perceptual intent, while Firefox (version 64) uses colorimetric intent.</p>
<p>Serving two manually adjusted versions to take the wide gamut advantage on iOS users while still serving optimum sRGB images… would require you to adjust colors in both spaces. The benefits are unlikely to balance the burden for photography and retouch teams.</p>
<h3 id="heading-summary">Summary</h3>
<p>A good practice from studio to web is sticking end to end to the same color space. In most (practically all) cases this means sticking to sRGB.</p>
<p>When different sources of images and video cater to the workflow, this requires awareness for all the people involved in the image creation and processing chain.</p>
<p>However, display technology has recently moved from racing on resolution to racing on color gamut. So, we should keep an eye on the P3 color space and the tech used by our users. As more and more of them purchase wide gamut displays, switching to images with a P3 color profile may start to make sense.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to hack your Mac and give it the gorgeous wallpapers it truly deserves ]]>
                </title>
                <description>
                    <![CDATA[ By Aakaash Jois Let’s face it. The default wallpapers on the Mac gets boring after a few weeks. And setting new wallpaper manually is tiresome. Well, what if I told you that I got my Mac greet me with a brand new, high resolution wallpaper every time... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/this-is-the-wallpaper-your-mac-truly-deserves-with-a-bit-of-coding-f3149bbeb51/</link>
                <guid isPermaLink="false">66c36319c6c49ae59cf21b12</guid>
                
                    <category>
                        <![CDATA[ Apple ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 11 Mar 2017 23:33:33 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*kEVDB5B2KX5_O69b0ccLPQ.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Aakaash Jois</p>
<p>Let’s face it. The default wallpapers on the Mac gets boring after a few weeks. And setting new wallpaper manually is tiresome. Well, what if I told you that I got my Mac greet me with a brand new, high resolution wallpaper every time I flip it open?</p>
<p>If you’re a Chromecast user, you may be familiar with <a target="_blank" href="https://www.google.com/chromecast/backdrop/">Chromecast Backdrop</a>. Backdrop allows the Chromecast to display a slideshow of beautiful photos when it’s idle.</p>
<p>While most users default to Facebook to post photos, a lot of photographers use Google+ to publish their work. Google selects some of these best photos to create brilliant slideshows.</p>
<p>For a long time, this was exclusive to ChromeCast user. But a few months ago, Google released a nifty app for Mac called <a target="_blank" href="https://plus.google.com/featuredphotos">Google Featured Photos</a>.</p>
<p>You may be wondering why my title says “wallpaper” but then links to a “Screen Saver” app. Well, there’s the little trick. On a Mac, any screen saver can be made to run as a wallpaper with just one line of code.</p>
<p>First, you have to download and install the <a target="_blank" href="https://plus.google.com/featuredphotos">Google Featured Photos Screen Saver</a>. Next, go to <em>System Preferences</em> → <em>Desktop &amp; Screen Saver</em> and set the <em>Google Featured Photos</em> as the active screen saver. Now it’s time to run the magic code.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/6uI-dPJ4HxwPs-zEr6X2tOaLgd4cVCxJisDG" alt="Image" width="480" height="300" loading="lazy">
<em>Set Google Featured Photos as Screen Saver</em></p>
<h4 id="heading-coding-time">Coding Time!</h4>
<p>Fire up Terminal and paste the below line of code. It will set your screen saver as your wallpaper.</p>
<pre><code>/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &amp;
</code></pre><h4 id="heading-edit-apple-decided-to-restructure-a-bit-in-high-sierra">EDIT: Apple decided to restructure a bit in High Sierra.</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/PIf9ZPG2dnz2LDhSVwH8wkXipDvVITqT1J4K" alt="Image" width="488" height="480" loading="lazy"></p>
<p>If you are using High Sierra (or later), the <code>ScreenSaverEngine.app</code> has been moved to a different location. Use the code below instead of the one above.</p>
<pre><code>/System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &amp;
</code></pre><p>Just replace all occurrences of <code>Frameworks/ScreenSaver.framework/Resources</code> with <code>CoreServices</code> and you will be good to go!</p>
<p>Cool, right?</p>
<p>The problem with running just that line of code is that if you close the Terminal window — or if your Mac goes to sleep — the screen saver closes and your wallpaper goes back to whatever it was by default. To handle this, we need to go a bit deeper.</p>
<p>To detect when the Mac sleeps and wakes up, we need a small piece of software called “Sleepwatcher.” You can download it <a target="_blank" href="http://www.bernhard-baehr.de/sleepwatcher_2.2.tgz">here</a>. Just open the file and your Mac will extract the downloaded file (sometimes it might have to be extracted twice). After extracting, you’ll get a “sleepwatcher_2.2” folder. Just move this folder to Desktop and run the following lines of code in the Terminal.</p>
<pre><code>sudo mkdir -p /usr/local/sbin /usr/local/share/man/man8
</code></pre><p>You might need to enter your password after pasting this line. Next, run:</p>
<pre><code>sudo cp ~<span class="hljs-regexp">/Desktop/</span>sleepwatcher_2<span class="hljs-number">.2</span>/sleepwatcher /usr/local/sbin
</code></pre><p>Then run:</p>
<pre><code>sudo cp ~<span class="hljs-regexp">/Desktop/</span>sleepwatcher_2<span class="hljs-number">.2</span>/sleepwatcher<span class="hljs-number">.8</span> /usr/local/share/man/man8
</code></pre><p>Awesome! You have successfully installed Sleepwatcher.</p>
<p>Now let’s add the lines of code needed to make Sleepwatcher run the screen saver when your Mac wakes up, and kill the screen saver when your Mac goes to sleep.</p>
<p>Sleepwatcher searches for and runs two files, <code>.sleep</code> when the Mac sleeps, and <code>.wakeup</code> when the Mac wakes up. We just need to create these 2 files in the user’s Home Directory.</p>
<p>In the Terminal, type <code>nano ~/.wakeup</code> then paste the below code.</p>
<pre><code>#!<span class="hljs-regexp">/bin/</span>bashosascript -e <span class="hljs-string">'do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &amp; EOF"'</span>
</code></pre><p>Now press <strong>Control + X</strong> to exit. When it asks if you want to save the file, press <strong>Y</strong> and then press the enter key to confirm the file name. This will create the <code>.wakeup</code> file. Now to create the <code>.sleep</code> file.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/bAhqA6gKmCsnH2MBP7bdHc4yEox2raRLTATj" alt="Image" width="800" height="134" loading="lazy">
<em>The .wakeup file</em></p>
<p>Just like above, type <code>nano ~/.sleep</code> and paste the below code.</p>
<pre><code>#!<span class="hljs-regexp">/bin/</span>bash
</code></pre><pre><code>osascript -e <span class="hljs-string">'do shell script "kill `ps -ax | grep [S]creenSaver | cut -c1-6` EOF"'</span>
</code></pre><p>Again, press <strong>Control + X</strong> to exit, <strong>Y</strong> to save, and then the enter key to confirm the file name. Now the <code>.sleep</code> file will be created.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/oGnweS4gcVcIWtmisaePYhRDrlTgahBL3U6h" alt="Image" width="800" height="134" loading="lazy">
<em>The .sleep file</em></p>
<p>In Terminal, run the below line of code.</p>
<pre><code>chmod <span class="hljs-number">700</span> ~<span class="hljs-regexp">/.sleep ~/</span>.wakeup
</code></pre><p>It changes the permissions for the newly created files so that it can be run by Sleepwatcher.</p>
<p>Now that you’ve created the scripts, you just need to add Sleepwatcher to <code>launchd</code> so that it can start when the system starts, then continue to run in the background. Paste the following code code into your Terminal.</p>
<pre><code>cp ~<span class="hljs-regexp">/Desktop/</span>sleepwatcher_2<span class="hljs-number">.2</span>/config/de.bernhard-baehr.sleepwatcher<span class="hljs-number">-20</span>compatibility-localuser.plist ~<span class="hljs-regexp">/Library/</span>LaunchAgents
</code></pre><p>This will copy the Sleepwatcher property list file so that it can be added to <code>launchd</code>. Now just paste the code below into Terminal to add Sleepwatcher to <code>launchd</code>.</p>
<pre><code>launchctl load ~<span class="hljs-regexp">/Library/</span>LaunchAgents/de.bernhard-baehr.sleepwatcher<span class="hljs-number">-20</span>compatibility-localuser.plist
</code></pre><p>Awesome! You can now restart your Mac and the <code>launchd</code> will run the Sleepwatcher scripts at the startup. Just put your Mac to sleep and wake it up. Then you’ll be welcomed with a beautiful wallpaper.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/SdQIhifPuCV8vx-vSgqLlgLHmNDTpM59Weqa" alt="Image" width="800" height="500" loading="lazy">
<em>Example of the newly installed Wallpaper</em></p>
<p>If you want to uninstall everything and go back to default, follow the link below.</p>
<p><a target="_blank" href="https://medium.com/@aakaashjois/to-uninstall-run-the-following-lines-in-terminal-one-by-one-299916c8ff3b"><strong>To uninstall, run the following lines in Terminal one by one.</strong></a><br><a target="_blank" href="https://medium.com/@aakaashjois/to-uninstall-run-the-following-lines-in-terminal-one-by-one-299916c8ff3b">_After running these, you can uninstall the Google Screen Saver and restart your Mac. It should be removed. Let me know…_medium.com</a></p>
<p>I hope you enjoyed this short tutorial, and enjoy these beautiful wallpaper photos. If you liked this, hit the ❤️ and stay tuned for more.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Photos and stories from a designer ]]>
                </title>
                <description>
                    <![CDATA[ By Jonathan Z White Some of the best designers are also some of the best storytellers. I don’t think this is a coincidence. This is because good designers think about design in terms of stories — frame by frame narratives that illustrate a user’s jou... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/photos-and-stories-from-a-designer-5ee97750ae5/</link>
                <guid isPermaLink="false">66d45f78a326133d12440a0d</guid>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Travel ]]>
                    </category>
                
                    <category>
                        <![CDATA[ user experience ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 26 Jul 2016 17:15:51 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*NsmrJXcrr9pLuVqSctVyTA.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jonathan Z White</p>
<p>Some of the best designers are also some of the best storytellers. I don’t think this is a coincidence.</p>
<p>This is because good designers think about design in terms of stories — frame by frame narratives that illustrate a user’s journey through a product.</p>
<p>One of the things that taught me how to be a better story teller — and inadvertently a more empathetic designer — is photography. This is because <strong>photography helps frame your mind.</strong> It makes you think about interactions in terms of characters, settings, and outcomes, key components in product narratives.</p>
<p>This past year, I challenged myself to experiment with photography. I learned that photography refines mechanical skills, like your ability to compose images and create balance. It also teaches you how to use imagery as a way of capturing and conveying stories and experiences.</p>
<p>Here are some photographs and stories that I’ve collected. Hopefully, they encourage you to look at other mediums outside of design to develop your unique style and perspective as a designer.</p>
<h4 id="heading-new-city-new-job-new-life">New city, new job, new life</h4>
<p>This photo was taken in New York. I was wandering around Midtown and happened on a park squished between two office buildings. I loved the lighting so I decided to stop and take some photos.</p>
<p>At the time, I wanted to focus on <em>people</em> as my subjects. <strong>This is because photographing people is hard.</strong> You have capture their emotions and character while reconciling that with your own artistic vision.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/SqzfkulUcsWoizFPLTZCSLbyBicr6ZXdZy8u" alt="Image" width="800" height="533" loading="lazy">
<em>New city, new job, new life</em></p>
<p>I looked around for a candidate and noticed a person sitting on a bench in the park. I went up to her and asked her if it was okay to include her a photo. This part is <em>always</em> nerve wracking. Some people yes, a lot of people say no. In her case, she was completely fine with it.</p>
<p>And I’m glad I asked. I can’t remember her name but her back story always stuck with me.</p>
<p>Up until a few weeks ago, her and her husband had been working full-time in London. But her husband had recently found a new job in New York. So they decided to move. This meant that they had to uproot their lives and move to a completely new city.</p>
<p>As it turns out, the moment captured in the photo was right after her very first job interview. <em>New city, new job, new life.</em></p>
<h4 id="heading-on-a-roof-in-a-city">On a roof in a city</h4>
<p>This photo was taken at night at Top of The Rock. It’s an observation deck that offers a breathtaking view of New York. The story behind this photo has to do with the person I met in the process of getting this photo.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/PSdaN3w9-UFDghcUdgx5ICn1t0IK3vInF3aR" alt="Image" width="800" height="533" loading="lazy">
<em>On a roof in a city</em></p>
<p>It was around golden hour, the last hour of sunlight in a day. I was taking photos of the skyline when someone tapped my shoulder. It was a girl. She saw my camera, and she wanted me to take a photo of her with the city in the background.</p>
<p>I asked her if the photo was for anything specific. Apparently, every year around Christmas, she would send out a Christmas card. The cover was always a picture of her holding a sign that said “Merry Christmas.”</p>
<p>What caught my attention was how much she <em>loved</em> to travel. Every year, the picture was in a different country. In order to keep traveling, she had decided to become a flight attendant for Lufthansa, the German airline.</p>
<p>That was her very last night in New York. The next day, she was on a plane to Germany to start her training.</p>
<h4 id="heading-from-iron-age-forts-to-bandits">From iron age forts to bandits</h4>
<p>When I was in New York, I stayed at the home of two long-time friends of my dad, a husband and wife.</p>
<p>Mark, the husband, is one of the most interesting people I’ve ever met. In his youth, hitchhiking was his passion. Early on, he spent his days hitchhiking across the U.S, as far south as New Orleans, and as far north as Alaska.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/lPlIIugnHEiv1wjyo6NzLHLepZPMn5NflVJ7" alt="Image" width="800" height="533" loading="lazy">
<em>From iron age forts to bandits</em></p>
<p>Between 1978 and 1980, Mark hitchhiked around the world. His experiences shaped his personality, from discovering iron age forts in archeological forays in Scotland to being held up by bandits in the Iranian desert with an entire camp of refugees.</p>
<p>This photo is a reminder of Mark and his stories.</p>
<h4 id="heading-kindness-in-the-subway">Kindness in the subway</h4>
<p>This picture was taken on my last day in the subway. I was on my way to the airport when I encountered a trumpet player in the subway.</p>
<p>There was a homeless person laying down across from the trumpet player. After playing a set, the trumpet player took a break and bought out a saran- wrapped sandwich from his bag.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/e8TfO3fUw6NBdOybSEngSvRKysBm6Hmxla8L" alt="Image" width="800" height="533" loading="lazy">
<em>Kindness in the subway</em></p>
<p>Instead of taking a bite into it the sandwich, the trumpet player split it in half. He offered one half to the man lying on the other side of the hall, and bit into the other half.</p>
<p>This exchange felt so genuine. There were no strings attached. After donating a small amount to both gentlemen, I asked the trumpet player if I could take a photo of him.</p>
<p>Now, every time I look at this photo, it reminds me of this story.</p>
<p>What stories do you have? What are some favorite photographs that remind you of them? Leave me a note here or <a target="_blank" href="https://twitter.com/jonathanzwhite">tweet</a> them to me on Twitter.</p>
<p>You can find me on Medium where I publish every week. Or you can follow me on <a target="_blank" href="https://twitter.com/JonathanZWhite">Twitter</a>, where I post non-sensical ramblings about design, front-end development, and virtual reality.</p>
<p><em>P.S. If you enjoyed this article, it would mean a lot if you click the ? and share with friends.</em></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/dLgmU3S-vFhKjwMwDfmFWaev9fZVuTcbPyrO" alt="Image" width="479" height="260" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/am12Cpi-YcI31YRZ8Pj0WVqsKc1lQ93K7JQm" alt="Image" width="480" height="260" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ A Special Hell for Designers Like Me ]]>
                </title>
                <description>
                    <![CDATA[ By Adrian Hanft Part 1: Scratching the Surface You keep hearing me talk about oatmeal and zombies. In case you think I am pointing fingers from my ivory tower, today I want to confess my own contribution to this mess. (Disclaimer: Trashing your clien... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-special-hell-for-designers-like-me-5c55bd855613/</link>
                <guid isPermaLink="false">66c34341790a62b5fbf7b85f</guid>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Photography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ photoshop ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UX ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 23 Jan 2016 20:18:10 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*Xv2-XEB7caY1oQ34IhhMyQ.gif" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Adrian Hanft</p>
<h4 id="heading-part-1-scratching-the-surface">Part 1: Scratching the Surface</h4>
<p>You keep hearing me talk about <a target="_blank" href="https://medium.com/@ade3/the-slow-steady-inevitable-march-towards-oatmeal-e29e2ac2a10f#.i64stw1mr">oatmeal</a> and <a target="_blank" href="https://medium.com/swlh/the-zombie-mobile-b03932ac971d#.4wbb1jvtc">zombies</a>. In case you think I am pointing fingers from my ivory tower, today I want to confess my own contribution to this mess.</p>
<p><em>(Disclaimer: Trashing your clients and former employer is bad form, even after a decade of silence. That’s not my intention. The people I worked with and for in the story that follows were not zombies. We were <a target="_blank" href="https://medium.com/@ade3/inside-or-out-767884695959#.b2ju355wg">passionate insiders trying to make a difference in a zombie industry</a>.)</em></p>
<p>I knew I was going straight to designer hell the summer of hurricane Katrina. I was taking a lunch break from a photo shoot in Indiana, the heart of American RV manufacturing. I was stopped at a railroad crossing, waiting for a train to roll by. The cargo was unbranded RVs. Hundreds of big white boxes rushing south like blood cells racing to a wound.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*gW5OsV47uoZwG_Hxp3g4WQ.png" alt="Image" width="800" height="435" loading="lazy">
<em>Some of the 120,000+ RVs heading to help hurricane victims.</em></p>
<p>The RVs were to be temporary homes for the victims of the hurricane.</p>
<p>People were helping other people. <em>Warm fuzzies.</em></p>
<p>This is the surface appearance, the outer layer where designers, marketers, and brand experts make our living. Here we assume good intention, never question motives, and spin the details into glossy, highly consumable stories about our clients.</p>
<p>The logoless RVs on that train seemed like a perfect metaphor for the marketing industry. Clients come to us with their plain white boxes. Then the creative people go to work. We add stylish stickers to the product. We create logos and invent brands. We stage photo shoots where, if we put the camera in just the right spot, we can make the white boxes look like luxury goods.</p>
<p>This was my job, and I would like to think I did it well. The work we created for our RV client was solid, and when you compare it to the notoriously low standards of the competition, we had created a surface layer for our client that put them (arguably) at the top of the industry. Here is my story, a list of the sins that I committed, and the secrets of how to market white boxes.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*kfEwKsdQFEQLreXFC-u4xQ.jpeg" alt="Image" width="800" height="296" loading="lazy">
<em>An assortment of websites I helped create</em></p>
<p>First, let me tell you a little bit about the literal surface of the RVs. The exteriors are ugly and the swirly stickers don’t help much. I desperately wanted a chance to improve the graphics of the RVs. It seemed like the easiest way to differentiate our client’s white boxes from the competition.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*qnQKC4PG_51mQjhTXK6lEg.gif" alt="Image" width="800" height="600" loading="lazy"></p>
<p>Here’s how the graphics on an RV come to be. RV manufacturers have contracts with the companies that produce the decorative decals. The “design costs” are baked into the cost of the stickers. These sticker-makers are cutting deals with all the RV makers so all the stickers are designed by the same cost-constrained designers. It’s a monopoly of mediocrity.</p>
<p>Each year our agency would plead for a chance to design the stickers. Each year we lost. So we worked with what we had.</p>
<p>You can still make a white box with ugly stickers the object of desire. Like any magic trick, once you know the secret the illusion loses it’s charm. So let’s demystify this a bit.</p>
<h4 id="heading-magic-trick-1-makeup">Magic Trick 1: Makeup</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*AO6n57c0H8GLsAoszauwUQ.gif" alt="Image" width="800" height="572" loading="lazy">
<em>An alley in the ghetto transforms into paradise. Magic.</em></p>
<p>The first trick is the oldest in the book. Add makeup. Photoshop out the blemishes. Fix it in post.</p>
<p>Park an RV anywhere, it could be on the side of the road. Replace the dirty industrial park with an imaginary single-lane highway pointed at some mountains. Well done, designer.</p>
<p>“<em>Oh, by the way.</em> We don’t have money for you to repeat that trick this year. Go ahead and add our new slightly less ugly graphics to the photo you faked last year.”</p>
<p>The post-production used in photos of female models is well-documented. The damage to the self-image of women is obvious and easy to point at. You rarely hear criticism of the day-to-day product photo touchup. Who are the victims of this deception? We’ll get to that, just stick with me.</p>
<h4 id="heading-magic-trick-2-use-a-wide-angle-lens">Magic Trick 2: Use a Wide Angle Lens</h4>
<p>I don’t know if you have been in an RV, so let me just tell you. They are tiny. Often you can stick your arms out and touch both walls. Making the interior of an RV look spacious is an impressive trick.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*9OXP4yvxrK7U0z79zAWi_A.gif" alt="Image" width="800" height="527" loading="lazy"></p>
<p>One of my favorite things about working for an RV client was being able to art direct the photo shoots for RV interiors.</p>
<p>We used an assortment of photographers in Indiana who specialized in creating these illusions. It was amazing to watch them build a shot. In the morning you have an ordinary RV. You find the best place to put the camera. Select the right lens. Manicure the surfaces. Add props. Then carefully build light. By the end of the day you have achieved the impossible–the tiny interior looks massive.</p>
<p>The final step would be for me to take the interior photo, cut out the windows, and insert a stock photo of a beautiful landscape. <em>Deception complete.</em></p>
<h4 id="heading-magic-trick-3-misdirection">Magic Trick 3: Misdirection</h4>
<p>The third trick is misdirection. If your product can’t rely on its own good looks, you create images that encourage the viewer to look at something else. We called them lifestyle photos. Pictures of smiling, happy people doing exciting things with your product as a prop in the background. The sleight of hand is to shift of attention away from the product.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*Xv2-XEB7caY1oQ34IhhMyQ.gif" alt="Image" width="800" height="500" loading="lazy"></p>
<p>Imagine an adventurous couple on vacation. They slide their canoe into a crystal clean lake. Before climbing onboard, the man looks back over his shoulder at his RV parked on the beach. With a knowing nod, he thanks the heroic product for making this all possible.</p>
<p>If you can convincingly Photoshop this concept does it matter that it is a complete fiction? You can answer “no” once or twice, but when you see this trick done enough times you have to wonder. How far removed from reality can something get before the product, the reason you are doing this work in the first place, ceases to be a touched-up version of reality and crosses the line into a deception that obscures truth.</p>
<p>It makes a better trick to include the product in your illusions, but this isn’t mandatory. Simply having your product <em>next to</em> lifestyle images can be enough to distract attention away from the product. For the record, the following brochure cover wasn’t created by me.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*AAbCO5S8lg0TGswnVSZHmw.png" alt="Image" width="231" height="300" loading="lazy">
<em>If you make the product small enough, ugly exteriors are ignorable.</em></p>
<p>Let’s jump back to Indiana where I watched the train of unbranded RVs dissappear in the distance. I crossed the tracks and headed back to the photo studio where I commented on the train and how great it was to see an act of goodwill. I asked if anyone knew which RV company was making such a generous donation. The response was,</p>
<blockquote>
<p>“Donation? Why do you think there isn’t a single logo on those RVs?”</p>
</blockquote>
<p>I had no idea. What I learned next made me question everything. Were my magic tricks really harmless illusions? My tiny exaggerations were about to become a dangerous contribution to a lie that ended up permanently injuring people.</p>
<p>Today’s post was about the surface layer, the tricks of the trade that by themselves seem harmless. Next week I am going to talk about what happens when you start asking questions. <em>That’s where my path to hell gets paved.</em></p>
<p><a target="_blank" href="https://medium.com/@ade3/got-a-brand-problem-put-a-bird-on-it-4e99ec94af37#.hdwioivxw">Part 2: Got a Brand Problem? Put a Bird on it.</a></p>
<p>Thanks for reading. <em>Like it?</em> Poke the heart icon. <em>Love it?</em> Highlight and share. <em>Hate it?</em> Write a response and <a target="_blank" href="https://twitter.com/ade3">curse me on Twitter</a>. That’s the fuel that keeps me typing. <em>Stay creative.</em></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
