New HTMLTexture not getting dimensions of image

Hello Devvvvs

I have been using the HTMLTexture in projects with beta34 and earlier versions to load images from a url. Recently I tried to update to beta35 with new HTMLTexture node (which seems awesome otherwise btw) and found one significant change.

Using the old HTMLTexture from beta34.2 addon pack, when setting width & height to 0 on the inputs, it will return a texture in the native resolution of the image. Doing this with the new node, it returns a texture of 0x0px or whatever was set previously.

Any chance you could add/fix that for the next release? Or is there another way to do this? Am I missing sth? Or is it just not meant to be used like this?
It’s a super important feature I think, as it allows to load any random image with a link provided by an API or similar and then use the actual dimensions of the image to draw it properly. As in many cases you might not be able to know what the dimensions of the image are.

See sample patch below. When you open it in beta34 you can toggle the input link at see the dimension change. When you open it in beta35 it just delivers an empty texture with 0/0 resolution.

Thanks guys & and happy 2018!!
Simon

HTML-Texture-No-Native-Dims.v4p (8.4 KB)

if you’re on dx9, try HTTPGet->DynamicTexture instead, as demonstrated in the helppatch of DynamicTexture (EX9.Texture Raw) for a cheaper solution than running a whole htmltexture for only reading an image. does that work?

sidenote: also the whole thing (including returning a texture) should be even more efficiently done in vl using the new texturedescription/uploadtexture nodes. note to self: do a proper blog post explaining this!

Ok…yes. That seems to work! And as you mentioned, even cheaper to run. Thanks for the tip!
Happy to try the vl solution. Will give it a try, but yeah…always great to have a nice Joreg tutorial about this :)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.