Redth / ResizetizerNT

Add SVG's and PNG's to your shared Xamarin Project
MIT License
318 stars 31 forks source link

Generated Images are blank #31

Closed waseem852 closed 3 years ago

waseem852 commented 3 years ago

Hi All, I am using ResizetizerNT 0.2.0 on a Xamarin forms (Android and iOS only) project. When I checked the obj folder, Resizertizer folder is created and the images are just blank. I am using SVG file as the base Image.

image

image

What am I Missing ?

Kylar182 commented 3 years ago

Same, swapped back to .1 and all normal again

waseem852 commented 3 years ago

Same, swapped back to .1 and all normal again

Yes, It is working with 0.1.0. but blank is 0.2.0.

Kylar182 commented 3 years ago

@waseem852 I'm not an expert but I'd guess the new TintColor Addition is blanking them since I don't have it set on any of my images

waseem852 commented 3 years ago

@waseem852 I'm not an expert but I'd guess the new TintColor Addition is blanking them since I don't have it set on any of my images

So the tintcolor is mandatory for this to work on 0.2.0 🤔

waseem852 commented 3 years ago

Added TintColor="#FFFFFF" to the and result is still the same. Blank.

Feroks commented 3 years ago

It seems you need to provide alpha component, so that HEX is 8 digit. Try adding FF at the start of your TintColor value.

waseem852 commented 3 years ago

It seems you need to provide alpha component, so that HEX is 8 digit. Try adding FF at the start of your TintColor value.

Hex with 8 digits produce the same results. black blank images. currently only reverting to 0.1.0 works.

Feroks commented 3 years ago

Strange. Can you attach one of the images and specify what HEX color you are using?

waseem852 commented 3 years ago

Strange. Can you attach one of the images and specify what HEX color you are using?

Building.zip

Image is attached (Zipped because cannot upload SVG). I tried without any tintcolor, tintcolor with #FFFFFF and tintcolor with #FFFFFFFF. All gave blank Black images.

Feroks commented 3 years ago

Strange. Can you attach one of the images and specify what HEX color you are using?

Building.zip

Image is attached (Zipped because cannot upload SVG). I tried without any tintcolor, tintcolor with #FFFFFF and tintcolor with #FFFFFFFF. All gave blank Black images.

@waseem852 This is not a real SVG. It just contains png image as base64 string. I am actually curious how it worked for you on 0.1 version.

waseem852 commented 3 years ago

Strange. Can you attach one of the images and specify what HEX color you are using?

Building.zip Image is attached (Zipped because cannot upload SVG). I tried without any tintcolor, tintcolor with #FFFFFF and tintcolor with #FFFFFFFF. All gave blank Black images.

@waseem852 This is not a real SVG. It just contains png image as base64 string. I am actually curious how it worked for you on 0.1 version.

It was working on 0.1.0 without any issues. I mean the same file. once upgraded to 0.2.0, it started to generate those black images.

Redth commented 3 years ago

In any case, if you're just using a PNG inside a vector, just save it as a PNG and use that instead. Not sure what would have changed in SkiaSharp between versions but I'm not really sure it's worth trying to support when there's a very reasonable workaround.