Incorrect Change of Image Background Color due to Conversion

Hi,

I am trying to convert image to pdf, After converting background is set to black. Can you please look into this issue.

    string input = @"C:\Users\ams2889\Pictures\input.jpg";
    string output = @"C:\Users\ams2889\Pictures\output.pdf";

    try
    {
      Document pdfDocument = new Document();
      pdfDocument.Pages.Add();
      Aspose.Pdf.Rectangle rect = pdfDocument.Pages[1].GetPageRect(false);
      rect.LLY = 40;
      rect.URY = 775;
      pdfDocument.Pages[1].AddImage(input, rect);
      pdfDocument.Save(output);
    }
    catch(Exception ex)
    {
      Console.Write(ex.ToString());
    }

Aspose.PDF.Drawing - 24.2.0

input_and_output.zip (4.3 MB)

@amolm
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56782

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

I examined issue but currently I found no solution for this problem so I added task for development team to investigate
I found out that if you change image a bit it will be added normally, maybe this workaround will be helpful for now
jpg_issue_test.zip (1.2 MB)

Hi @ilya.zhuykov

Thanks for your reply.
Please let me know once this issue is fixed

Thanks,

1 Like

Hi @ilya.zhuykov
Can you please update me?

@amolm
Hello
Unfortunately no, currently there’s no progress
I checked if issue remains on release Aspose.PDF.Drawing 24.3, it’s still relevant

Hi @ilya.zhuykov
Any update on this?

@amolm
Unfortunately no, there’s no updates on this task
I’ll check tomorrow - there’s a chance that it was resolved in another request

@amolm , no , unfortunately it’s still present
I’ll try to raise priority to speed up the process

Thanks @ilya.zhuykov

1 Like