# What is the correct scale to use with createComponentSnapshot() for creating an image for startDragging?

**URL:** <https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388>\
**Category:** General JUCE discussion\
**Created:** [February 11, 2021, 10:01pm UTC](https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388 "2021-02-11T22:01:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [February 11, 2021, 10:01pm UTC](https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388/1 "2021-02-11T22:01:09Z")

</div>

If I use `getApproximateScaleFactorForComponent` then my drag image shrinks a bit and is smaller the source component.

If I use `getGlobalScaleFactor()` then the drag image is blurry. If I use 1 than the drag image is blurry.

The text on the left is normal, the text on the right is being dragged. Why is it far blurrier?

![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/a/a8614ccf0f65512b22e4030d7f99673dfad175ab.png)

---

<div class="post-metadata">

**Author:** ![Toddler-Boy](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/toddler-boy/32/2007_2.png) [@Toddler-Boy](https://forum.juce.com/u/Toddler-Boy)\
**Post date:** [February 12, 2021, 2:50am UTC](https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388/2 "2021-02-12T02:50:48Z")

</div>

Because it doesn’t take the DPI scaling into account, so the bitmap is actually smaller than the physical resolution.

---

<div class="post-metadata">

**Author:** ![Toddler-Boy](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/toddler-boy/32/2007_2.png) [@Toddler-Boy](https://forum.juce.com/u/Toddler-Boy)\
**Post date:** [February 12, 2021, 3:20am UTC](https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388/3 "2021-02-12T03:20:22Z")

</div>

Creating a higher-res image doesn’t help, as the DragAndDrop classes in JUCE have no concept of DPI, so a larger bitmap is a larger object that gets dragged around.

---

<div class="post-metadata">

**Author:** ![asimilon](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/asimilon/32/4235_2.png) [@asimilon](https://forum.juce.com/u/asimilon)\
**Post date:** [February 12, 2021, 8:01am UTC](https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388/4 "2021-02-12T08:01:45Z")

</div>

> [@Toddler-Boy](#):
>
> no concept of DPI

Draggable `TableListBox` rows also suffer this annoying “feature”. I hacked JUCE once to overcome it, but my solution was _too_ much of a hack and far too many changes to consider maintaining it going forward.

---

<div class="post-metadata">

**Author:** ![AndreasLoANjoe](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@AndreasLoANjoe](https://forum.juce.com/u/AndreasLoANjoe)\
**Post date:** [March 11, 2021, 11:53am UTC](https://forum.juce.com/t/what-is-the-correct-scale-to-use-with-createcomponentsnapshot-for-creating-an-image-for-startdragging/44388/5 "2021-03-11T11:53:57Z")

</div>

Running into this issue too now, any workarounds?
