Start a new topic

HTMLDrawable only shows part of the content

HTMLDrawable only shows part of the content


Hi, I'm trying to show a GIF image with HTMLDrawable. the problem is that it only shows a part of the image and the image is cropped. here's my code : 

var loaderString = "<img src='http://25.media.tumblr.com/0916b3f2471020b8ca66557c2db0597a/tumblr_micyixexe01qb93d1o2_r1_500.gif'>";


var htmlSample = new AR.HtmlDrawable({html:loaderString}

                         ,1, {

                         offsetX: 0.0,

                         offsetY: 0.0,

                         zOrder: 2,

                         //horizontalAnchor: AR.CONST.HORIZONTAL_ANCHOR.CENTER,

                         //verticalAnchor: AR.CONST.VERTICAL_ANCHOR.MIDDLE,

});

 

Everything seems to be fine but the image is cropped.

I'll appreciate if yu can help me with this.

Thanks very much


 

Hi,

If you just want to display an image, I suggest you use ImageDrawables. The handling of images can be optimized when you use ImageDrawables.

Best,

Martin

Thanks , but I need to use HTML drawable in order to use GIF images with animation and this can't be done with ImageDrawables

Hi Joee,

OK, we've tried it with one of our devices, and it worked as expected. The device played the animated gif and showed it full size, so obviously there must be something device-specific.

Can you tell me what device and what operating system (version number) you are using, so we can check internally if there is an issue with a particular device, thanks!

Best,

Martin

Thanks Martin, I use Nexus 5 with 4.4.4 Android. It shows me the image like it's cropped.

Hi Joee,

Thanks. One last question: what Wikitude SDK version are you using?

Best,

Martin

Hi , I use Wikitude 4.0.0

Hi Joee,

Thanks, our team will look into this issue. We will follow up as soon as we have more information.

As a workaround for now, you could try AnimatedImageDrawables instead, but you would need to create a sprite sheet containing all frames you want to show.

Best,

Martin

Thanks very much , seems AnimatedImageDrawables was the thing I should have used in the first place :) it does exactly what I was looking for.
Login or Signup to post a comment