<p dir="auto"><strong>Thanks for reading!</strong></p>
<p dir="auto">I will show something to intro this issue.</p>
<p dir="auto"><strong>I have test two images:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="image one
original size 157 × 266"><pre class="notranslate"><code class="notranslate">image one
original size 157 × 266
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6055764/9401110/d96ac1e2-47fc-11e5-9f87-916d4b4800e4.jpg"><img src="https://cloud.githubusercontent.com/assets/6055764/9401110/d96ac1e2-47fc-11e5-9f87-916d4b4800e4.jpg" alt="img_20150820_145618 01 01" style="max-width: 100%;"></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="image two
original size 3264 × 2448"><pre class="notranslate"><code class="notranslate">image two
original size 3264 × 2448
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6055764/9401576/1f087d1e-4804-11e5-93b2-5c8a577cb9bb.jpg"><img src="https://cloud.githubusercontent.com/assets/6055764/9401576/1f087d1e-4804-11e5-93b2-5c8a577cb9bb.jpg" alt="img_20150820_145618" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Test One:</strong><br>
layout</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;ImageView
    android:id=&quot;@+id/photoView&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:scaleType=&quot;centerInside&quot;
    android:background=&quot;#2aa0a6&quot;/&gt;"><pre class="notranslate">&lt;<span class="pl-ent">ImageView</span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/photoView<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>match_parent<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">scaleType</span>=<span class="pl-s"><span class="pl-pds">"</span>centerInside<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">background</span>=<span class="pl-s"><span class="pl-pds">"</span>#2aa0a6<span class="pl-pds">"</span></span>/&gt;</pre></div>
<p dir="auto">code</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(getActivity())
     .load(path)
     .asBitmap()
     .into(new BitmapImageViewTarget(mPhotoView) {
            @Override
            public void onResourceReady(Bitmap resource, GlideAnimation&lt;? super Bitmap&gt; glideAnimation) {
                super.onResourceReady(resource, glideAnimation);
                Log.e(&quot;Glide Test&quot;, &quot;imageView scaleType=centerInside&quot;
                                + &quot; width=&quot; + mPhotoView.getWidth()
                                + &quot; height=&quot; + mPhotoView.getHeight() + &quot;, &quot;
                                + &quot; onResourceReady:&quot;
                                + &quot; bitmap width=&quot; + resource.getWidth()
                                + &quot; height=&quot; + resource.getHeight());
            }
    });"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-en">getActivity</span>())
     .<span class="pl-en">load</span>(<span class="pl-s1">path</span>)
     .<span class="pl-en">asBitmap</span>()
     .<span class="pl-en">into</span>(<span class="pl-k">new</span> <span class="pl-smi">BitmapImageViewTarget</span>(<span class="pl-s1">mPhotoView</span>) {
            <span class="pl-c1">@</span><span class="pl-c1">Override</span>
            <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">Bitmap</span> <span class="pl-s1">resource</span>, <span class="pl-smi">GlideAnimation</span>&lt;? <span class="pl-en">super</span> <span class="pl-smi">Bitmap</span>&gt; <span class="pl-s1">glideAnimation</span>) {
                <span class="pl-en">super</span>.<span class="pl-en">onResourceReady</span>(<span class="pl-s1">resource</span>, <span class="pl-s1">glideAnimation</span>);
                <span class="pl-smi">Log</span>.<span class="pl-en">e</span>(<span class="pl-s">"Glide Test"</span>, <span class="pl-s">"imageView scaleType=centerInside"</span>
                                + <span class="pl-s">" width="</span> + <span class="pl-s1">mPhotoView</span>.<span class="pl-en">getWidth</span>()
                                + <span class="pl-s">" height="</span> + <span class="pl-s1">mPhotoView</span>.<span class="pl-en">getHeight</span>() + <span class="pl-s">", "</span>
                                + <span class="pl-s">" onResourceReady:"</span>
                                + <span class="pl-s">" bitmap width="</span> + <span class="pl-s1">resource</span>.<span class="pl-en">getWidth</span>()
                                + <span class="pl-s">" height="</span> + <span class="pl-s1">resource</span>.<span class="pl-en">getHeight</span>());
            }
    });</pre></div>
<p dir="auto">test result log</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="image one
08-21 12:00:44.192  10260-10260/im.varicom.colorful E/Glide Test﹕ imageView scaleType=centerInside width=1080 height=1920,  onResourceReady: bitmap width=157 height=226
image two
08-21 12:00:44.414  10260-10260/im.varicom.colorful E/Glide Test﹕ imageView scaleType=centerInside width=1080 height=1920,  onResourceReady: bitmap width=3264 height=2448"><pre class="notranslate"><span class="pl-en">image</span> <span class="pl-en">one</span>
<span class="pl-c1">08</span>-<span class="pl-c1">21</span> <span class="pl-c1">12</span><span class="pl-pds">:00</span><span class="pl-pds">:44</span><span class="pl-kos">.</span><span class="pl-c1">192</span>  <span class="pl-c1">10260</span>-<span class="pl-c1">10260</span>/<span class="pl-en">im</span><span class="pl-kos">.</span><span class="pl-en">varicom</span><span class="pl-kos">.</span><span class="pl-en">colorful</span> <span class="pl-c1">E</span>/<span class="pl-v">Glide</span> <span class="pl-v">Test﹕</span> <span class="pl-en">imageView</span> <span class="pl-s1">scaleType</span><span class="pl-c1">=</span><span class="pl-en">centerInside</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">1080</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">1920</span><span class="pl-kos">,</span>  <span class="pl-en">onResourceReady</span>: <span class="pl-en">bitmap</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">157</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">226</span>
<span class="pl-en">image</span> <span class="pl-en">two</span>
<span class="pl-c1">08</span>-<span class="pl-c1">21</span> <span class="pl-c1">12</span><span class="pl-pds">:00</span><span class="pl-pds">:44</span><span class="pl-kos">.</span><span class="pl-c1">414</span>  <span class="pl-c1">10260</span>-<span class="pl-c1">10260</span>/<span class="pl-en">im</span><span class="pl-kos">.</span><span class="pl-en">varicom</span><span class="pl-kos">.</span><span class="pl-en">colorful</span> <span class="pl-c1">E</span>/<span class="pl-v">Glide</span> <span class="pl-v">Test﹕</span> <span class="pl-en">imageView</span> <span class="pl-s1">scaleType</span><span class="pl-c1">=</span><span class="pl-en">centerInside</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">1080</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">1920</span><span class="pl-kos">,</span>  <span class="pl-en">onResourceReady</span>: <span class="pl-en">bitmap</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">3264</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">2448</span></pre></div>
<p dir="auto">My conclusion:<br>
the <code class="notranslate">image one</code>'s width and height both <code class="notranslate">smaller than</code> the imageView size, <strong>it is show normally</strong>.</p>
<p dir="auto">the <code class="notranslate">image two</code>'s width and height both <code class="notranslate">larger than</code> the imageView size, the result bitmap width and height is the original size. I think it is not the right way!<br>
<strong>it let waste a lot of memory and let load the big image slower,<br>
if the image show in ViewPager, scroll will not smooth.</strong></p>
<p dir="auto">(I think the best way is let result bitmap size  <code class="notranslate">not larger than</code> the <code class="notranslate">imageView</code> size when the <code class="notranslate">image</code> size larger than the <code class="notranslate">imageView</code> size)</p>
<p dir="auto">　<br>
　<br>
<strong>Test Two:</strong><br>
layout</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;ImageView
    android:id=&quot;@+id/photoView&quot;
    android:layout_width=&quot;200dp&quot;
    android:layout_height=&quot;200dp&quot;
    android:scaleType=&quot;centerInside&quot;
    android:layout_centerInParent=&quot;true&quot;
    android:background=&quot;#2aa0a6&quot;/&gt;"><pre class="notranslate">&lt;<span class="pl-ent">ImageView</span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>@+id/photoView<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_width</span>=<span class="pl-s"><span class="pl-pds">"</span>200dp<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_height</span>=<span class="pl-s"><span class="pl-pds">"</span>200dp<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">scaleType</span>=<span class="pl-s"><span class="pl-pds">"</span>centerInside<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">layout_centerInParent</span>=<span class="pl-s"><span class="pl-pds">"</span>true<span class="pl-pds">"</span></span>
    <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">background</span>=<span class="pl-s"><span class="pl-pds">"</span>#2aa0a6<span class="pl-pds">"</span></span>/&gt;</pre></div>
<p dir="auto">code</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(getActivity())
    .load(path)
    .asBitmap()
    .into(new BitmapImageViewTarget(mPhotoView) {
            @Override
            public void onResourceReady(Bitmap resource, GlideAnimation&lt;? super Bitmap&gt; glideAnimation) {
                super.onResourceReady(resource, glideAnimation);
                Log.e(&quot;Glide Test&quot;, &quot;imageView scaleType=centerInside&quot;
                                + &quot; width=&quot; + mPhotoView.getWidth()
                                + &quot; height=&quot; + mPhotoView.getHeight() + &quot;, &quot;
                                + &quot; onResourceReady:&quot;
                                + &quot; bitmap width=&quot; + resource.getWidth()
                                + &quot; height=&quot; + resource.getHeight());
            }
    });"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-en">getActivity</span>())
    .<span class="pl-en">load</span>(<span class="pl-s1">path</span>)
    .<span class="pl-en">asBitmap</span>()
    .<span class="pl-en">into</span>(<span class="pl-k">new</span> <span class="pl-smi">BitmapImageViewTarget</span>(<span class="pl-s1">mPhotoView</span>) {
            <span class="pl-c1">@</span><span class="pl-c1">Override</span>
            <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">Bitmap</span> <span class="pl-s1">resource</span>, <span class="pl-smi">GlideAnimation</span>&lt;? <span class="pl-en">super</span> <span class="pl-smi">Bitmap</span>&gt; <span class="pl-s1">glideAnimation</span>) {
                <span class="pl-en">super</span>.<span class="pl-en">onResourceReady</span>(<span class="pl-s1">resource</span>, <span class="pl-s1">glideAnimation</span>);
                <span class="pl-smi">Log</span>.<span class="pl-en">e</span>(<span class="pl-s">"Glide Test"</span>, <span class="pl-s">"imageView scaleType=centerInside"</span>
                                + <span class="pl-s">" width="</span> + <span class="pl-s1">mPhotoView</span>.<span class="pl-en">getWidth</span>()
                                + <span class="pl-s">" height="</span> + <span class="pl-s1">mPhotoView</span>.<span class="pl-en">getHeight</span>() + <span class="pl-s">", "</span>
                                + <span class="pl-s">" onResourceReady:"</span>
                                + <span class="pl-s">" bitmap width="</span> + <span class="pl-s1">resource</span>.<span class="pl-en">getWidth</span>()
                                + <span class="pl-s">" height="</span> + <span class="pl-s1">resource</span>.<span class="pl-en">getHeight</span>());
            }
    });</pre></div>
<p dir="auto">test result log</p>
<div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="image one
08-21 12:42:30.365    8109-8109/im.varicom.colorful E/Glide Test﹕ imageView scaleType=centerInside width=600 height=600,  onResourceReady: bitmap width=157 height=226

image two
08-21 12:42:30.364    8109-8109/im.varicom.colorful E/Glide Test﹕ imageView scaleType=centerInside width=600 height=600,  onResourceReady: bitmap width=816 height=612"><pre class="notranslate"><span class="pl-en">image</span> <span class="pl-en">one</span>
<span class="pl-c1">08</span>-<span class="pl-c1">21</span> <span class="pl-c1">12</span><span class="pl-pds">:42</span><span class="pl-pds">:30</span><span class="pl-kos">.</span><span class="pl-c1">365</span>    <span class="pl-c1">8109</span>-<span class="pl-c1">8109</span>/<span class="pl-en">im</span><span class="pl-kos">.</span><span class="pl-en">varicom</span><span class="pl-kos">.</span><span class="pl-en">colorful</span> <span class="pl-c1">E</span>/<span class="pl-v">Glide</span> <span class="pl-v">Test﹕</span> <span class="pl-en">imageView</span> <span class="pl-s1">scaleType</span><span class="pl-c1">=</span><span class="pl-en">centerInside</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">600</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">600</span><span class="pl-kos">,</span>  <span class="pl-en">onResourceReady</span>: <span class="pl-en">bitmap</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">157</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">226</span>

<span class="pl-en">image</span> <span class="pl-en">two</span>
<span class="pl-c1">08</span>-<span class="pl-c1">21</span> <span class="pl-c1">12</span><span class="pl-pds">:42</span><span class="pl-pds">:30</span><span class="pl-kos">.</span><span class="pl-c1">364</span>    <span class="pl-c1">8109</span>-<span class="pl-c1">8109</span>/<span class="pl-en">im</span><span class="pl-kos">.</span><span class="pl-en">varicom</span><span class="pl-kos">.</span><span class="pl-en">colorful</span> <span class="pl-c1">E</span>/<span class="pl-v">Glide</span> <span class="pl-v">Test﹕</span> <span class="pl-en">imageView</span> <span class="pl-s1">scaleType</span><span class="pl-c1">=</span><span class="pl-en">centerInside</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">600</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">600</span><span class="pl-kos">,</span>  <span class="pl-en">onResourceReady</span>: <span class="pl-en">bitmap</span> <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">816</span> <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">612</span></pre></div>
<p dir="auto">My conclusion:<br>
When the <code class="notranslate">imageView</code> size change, the image which width and height both <code class="notranslate">smaller than</code> the imageView size, <strong>it will show normally</strong>.</p>
<p dir="auto">But, if the image width and height both <code class="notranslate">larger than</code> the imageView size, the result bitmap size sometimes will change also .</p>
<p dir="auto">But above all, I think when ImageView scaleType is centerInside, glide load the result bitmap size may be wrong!<br>
I think the best way is let result bitmap size <code class="notranslate">not larger than</code> the <code class="notranslate">imageView</code> size when the <code class="notranslate">image</code> size larger than the <code class="notranslate">imageView</code> size.</p>
<p dir="auto">Sometimes we need to load image for center inside, but I have not found this method!</p>
<p dir="auto">Can add method for center inside?</p>