microsoft / microsoft/psi

Different bitmap output based on makeCopy parameter in ToBitmap method

Open
#210 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
574
Forks
104
Avg merge
19m
Merged PRs (30d)
1

Description

public override async void Receive(Message<Shared<Image>> message)
{
    var bmp = message.Data.Resource.ToBitmap(false);
    bmp.Save("img.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

    // ...... removed for brevity
}

When var bmp = message.Data.Resource.ToBitmap(false); I get this image
image

When I change the Boolean using var bmp = message.Data.Resource.ToBitmap(true); I get this image.
image

Not sure if this is a bug or not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Resource.ToBitmap(bool makeCopy) implementation and reproduce the two paths from the Receive(Message<Shared>) example. Compare the resulting bitmap outputs and trace how makeCopy changes behavior; done means the intended behavior is established and the discrepancy is corrected or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.