View Issue Details

IDProjectCategoryView StatusLast Update
0002349NoesisGUIC# SDKpublic2022-06-09 16:38
Reporterdarthmaule2 Assigned Tosfernandez  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.1.4 
Fixed in Version3.1.5 
Summary0002349: Would like an API to retrieve the image bytes/pixels from an ImageSource
DescriptionWe often display various images or textures in an ImageSource and then later need to save those ImageSource's.
This can sometimes be done by just saving the thing we have bound to that imageSource but it's not always easy to access that.

It would simplify some of our workflows if we were able to retrieve the image bytes/pixels from an ImageSource.
TagsC#
PlatformAny

Activities

sfernandez

sfernandez

2022-05-19 20:12

manager   ~0007931

Last edited: 2022-05-20 11:07

In WPF the BitmapSource (base class of BitmapImage) provides a CopyPixels() method:
https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.imaging.bitmapsource.copypixels?view=windowsdesktop-6.0

Could that be what you are looking for?
darthmaule2

darthmaule2

2022-05-19 20:41

reporter   ~0007932

Something like that would work, although we would also like a way to know what format the pixels are in, which is something we can specify in the BitmapSource.Create call:

        public enum Format
        {
            BGRA8,
            BGR8,
            RGBA8,
            RGB8
        }
sfernandez

sfernandez

2022-05-20 11:07

manager   ~0007933

The Format is also available in the BitmapSource class in WPF, so we should be able to provide that too:
https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.imaging.bitmapsource.format?view=windowsdesktop-6.0
darthmaule2

darthmaule2

2022-05-20 11:41

reporter   ~0007934

That would be great, thanks.

Issue History

Date Modified Username Field Change
2022-05-14 11:10 darthmaule2 New Issue
2022-05-14 11:10 darthmaule2 Tag Attached: C#
2022-05-19 20:08 sfernandez Assigned To => sfernandez
2022-05-19 20:08 sfernandez Status new => assigned
2022-05-19 20:12 sfernandez Status assigned => feedback
2022-05-19 20:12 sfernandez Note Added: 0007931
2022-05-19 20:41 darthmaule2 Note Added: 0007932
2022-05-19 20:41 darthmaule2 Status feedback => assigned
2022-05-20 11:07 sfernandez Status assigned => feedback
2022-05-20 11:07 sfernandez Note Added: 0007933
2022-05-20 11:07 sfernandez Note Edited: 0007931
2022-05-20 11:41 darthmaule2 Note Added: 0007934
2022-05-20 11:41 darthmaule2 Status feedback => assigned
2022-06-09 16:38 sfernandez Status assigned => resolved
2022-06-09 16:38 sfernandez Resolution open => fixed
2022-06-09 16:38 sfernandez Fixed in Version => 3.1.5