Adding new format support to the Imaging namespace

Last post 07-18-2009 17:58 by volDeus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-18-2009 1:39

    Adding new format support to the Imaging namespace

    Hello .. I apologize if this question has been answered already, I have not been able to find the answer ... I am using the OpenNETCF.Drawing.Imaging namespace for a small project I have been working on for a few months and I have run into a situation that I am hoping someone might be able to help with ... I have created a method in my imaging wrapper that is a slightly modified version of the high-level ImageUtils.CreateThumbnail() method that I found the code for on a post at Alex Feinman's blog back in '06.. I am very happy with the functionality but have run into a rather disheartening speedbump when tying to load a .BMP image that was saved with PixelFormat.Format16bppRgb565 ... My project requires the ability to manipulate images in that PixelFormat and it seems that the imaging functions in OpenNETCF.Drawing.Imaging do not support it ... When I attempt, in my wrapper method, to load an image of that format; an exception is thrown when I call IImage.GetImageInfo() ... The exception is as follows: COMException was unhandled - Unspecified error "Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object." ErrorCode: -2147467259 I am new to C# and I am not farmiliar with COM interfaces but, from the wording in the blog post that I mentioned above ... "The Imaging API is an attempt to bring Image codec support from the desktop GDI+ to mobile devices. It is implemented as a set of COM interfaces available to C/C++ applications." I assume that I may be able to add support for the format I require ... I have already written my own implementation for loading and saving .BMP images in PixelFormat.Format16bppRgb565 since .NET CF 3.5 does not seem to support it ... So I am hoping that someone can point me in the right direction so that I can create a "COM Interface" or codec, that will add support the OpenNETCF.Drawing.Imaging functions, for the format that my project requires... Any help is greatly appreciated :)
  • 07-18-2009 17:58 In reply to

    Re: Adding new format support to the Imaging namespace

    (Sorry for the double post .. The formatting was lost in the first for some reason, and  it was very difficult to read.)

    Hello .. I apologize if this question has been answered already, I have not been able to find the answer ...

    I am using the OpenNETCF.Drawing.Imaging namespace for a small project I have been working on for a few months and I have run into a situation that I am hoping someone might be able to help with ...

    I have created a method in my imaging wrapper that is a slightly modified version of the high-level ImageUtils.CreateThumbnail() method that I found the code for on a post at Alex Feinman's blog back in '06..

    I am very happy with the functionality but have run into a rather disheartening speedbump when tying to load a .BMP image that was saved with PixelFormat.Format16bppRgb565 ...

    My project requires the ability to manipulate images in that PixelFormat and it seems that the imaging functions in OpenNETCF.Drawing.Imaging do not support it ...

    When I attempt, in my wrapper method, to load an image of that format; an exception is thrown when I call IImage.GetImageInfo() ... The exception is as follows:

    COMException was unhandled - Unspecified error
    "Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object."
    ErrorCode: -2147467259


    I am new to C# and I am not farmiliar with COM interfaces but, from the wording in the blog post that I mentioned above ...
    "The Imaging API is an attempt to bring Image codec support from the desktop GDI+ to mobile devices. It is implemented as a set of COM interfaces available to C/C++ applications."
    I assume that I may be able to add support for the format I require ...

    I have already written my own implementation for loading and saving .BMP images in PixelFormat.Format16bppRgb565 since .NET CF 3.5 does not seem to support it ... So I am hoping that someone can point me in the right direction so that I can create a "COM Interface" or codec, that will add support the OpenNETCF.Drawing.Imaging functions, for the format that my project requires...

    Any help is greatly appreciated :)

Page 1 of 1 (2 items)