-
Notifications
You must be signed in to change notification settings - Fork 14
naturalWidth / naturalHeight, raster #11
Comments
The use-cases mentioned in #10 do sound legitimate to me. It does seem useful to query the |
Agree that #10 seems legit. So I am thinking maybe we should support another set of attributes to return the backing size of the resource? |
It will layout at some size, which may not be 300x400 (as you mentioned in comment 1(a), but the intrinsic sizing input to layout will be 300x400. The actual bitmap raster will depend on more factors, such as final layout size, transforms, whether the image is directly composited, ... Not sure if making naturalWidth/Height not depend on the intrinsic sizing attribute, but instead on |
Re: It will layout at some size, which may not be 300x400 (as you mentioned in comment 1(a), but the intrinsic sizing input to layout will be 300x400. <img width="500" intrinsicSize="300x150" >p The image will layout at 500px by 250px, but the intrinsic width and height will be 300px and 150px. Or did I misunderstand it? intrinsicSize is only used when there's lacking information to compute final layout size before fully loading the image. And in addition, it will overrides the value of what naturalWidth/naturalHeight return. |
Yes, that's what I meant.
I agree. Just saying that "resolution of raster" is another question entirely. It's safe for you to ignore this and just say "layout" in your spec. |
Sounds good. Thanks. I think the only question we have left is is it a good idea to override naturalWidth / videoHeight |
I'm filing an issue to ask questions.
The explainer says "Specifically, the image would raster at these dimensions and naturalWidth/naturalHeight on images would return the values specified in this attribute."
Two questions:
Why do the natural* properties need to be reflected by the intrinsicsize attribute? Could those just
remain connected to the actual size of the resource? Or does this make the algorithm unreasonably
hard to explain?
What does "raster at these dimensions" mean in this context?
The text was updated successfully, but these errors were encountered: