mred icon indicating copy to clipboard operation
mred copied to clipboard

When I import a new image asset, the size is 100x100 regardless of image size

Open blairmacintyre opened this issue 5 years ago • 6 comments

What does this width/height mean? How is it used?

blairmacintyre avatar May 14 '19 20:05 blairmacintyre

Can you explain what you mean? If you upload an image from disk it will get a size based on the real size of the image. Then if you create a plane and use that asset as it's texture, the plane will resize itself to fit the image aspect ratio. Where are you seeing 100x100?

joshmarinacci avatar May 15 '19 03:05 joshmarinacci

On the right side, in the property pane.

bluemarble is 1024x1025 (in the glitch Assets), here we see 100x100

image

blairmacintyre avatar May 15 '19 08:05 blairmacintyre

I'm not seeing this behavior. When I add an asset that is in the glitch assets section, I get it with the correct size. Looking at the function addImageAssetFromExpandedURL in AssetActions.js I can see that the asset object is initially created with 100x100 but then it immediately asks for it from the cache, and once loaded sets the width and height to the real width and height. This implies the image isn't loading for some reason.

Can you easily recreate this?

joshmarinacci avatar May 16 '19 03:05 joshmarinacci

Can you still recreate this @blairmacintyre

joshmarinacci avatar May 19 '19 22:05 joshmarinacci

yep, just did it. On the glitch, I opened an image (tried it a few times), the image asset property sheet shows 100 x 100

blairmacintyre avatar May 19 '19 22:05 blairmacintyre

I rewrote some of this code. Does it still happen for you?

joshmarinacci avatar Jun 27 '19 18:06 joshmarinacci