Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image.Copy() #4

Open
swharden opened this issue Sep 14, 2022 · 2 comments
Open

Image.Copy() #4

swharden opened this issue Sep 14, 2022 · 2 comments

Comments

@swharden
Copy link
Owner

should have a way to create a copy of an image to allow destructive scaling without modifying the original

@swharden
Copy link
Owner Author

maybe too add a constructor for copying values from an existing image

@swharden
Copy link
Owner Author

This is getting the job done for now

private static SciTIF.Image Copy(this SciTIF.Image source)
{
    double[] values = new double[source.Values.Length];
    Array.Copy(source.Values, values, source.Values.Length);
    return new SciTIF.Image(source.Width, source.Height, values);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant