tomasmcguinness / dotnet-passbook

A .Net Library for generating Apple Passbook (Wallet) files for iOS. Please get involved by creating pull requests and opening issues!
MIT License
318 stars 117 forks source link

Logo/Icon not showing in case PassStyle.Coupon #155

Closed singhdilip1007 closed 2 years ago

singhdilip1007 commented 2 years ago

Hi, here's the code we're trying to show logo/icon on coupon but its not showing there.

request.Images.Add(PassbookImage.Logo, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/logo.png")));
request.Images.Add(PassbookImage.Logo2X, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/logo@2x.png")));
request.Style = PassStyle.Coupon;
tomasmcguinness commented 2 years ago

That's strange. What sizes are the images?

tomasmcguinness commented 2 years ago

Closed due to age.

007vel commented 1 year ago

@tomasmcguinness I am using 80 80, 160 160 and 240*240, none of logo is not showing up.

        ```
byte[] bytesLogo1 = DownloadImageAsync("images\\black_facebook@1x.png");   //80*80
            byte[] bytesLogo2 = DownloadImageAsync("images\\black_facebook@2x.png");  //160*160
            byte[] bytesLogo3 = DownloadImageAsync("images\\black_facebook@3x.png");  //240*240

            request.Images.Add(PassbookImage.Icon, bytesLogo1);
            request.Images.Add(PassbookImage.Icon2X, bytesLogo2);
            request.Images.Add(PassbookImage.Icon3X, bytesLogo3);
randjelovicaleksandar commented 11 months ago

@007vel Have you resolved this issue?