Re: BMP to JPG (again)
- From: Boris Nienke <nospam@xxxxxxxxx>
- Date: Thu, 28 Apr 2005 08:41:58 +0200
Cool, thank you!
Question:
---------
MSDN says about "SHLoadImageFile": [...]Converts a .gif file to a
bitmap.[...]
Now i know it also can load a BMP :-)
How did you know about this function(s) if you just knew, that you like to
load a BMP but didn' know if there's a MS-DLL available with some function
to do that?
And: my biggest problems with P/Invoke is, that i don't know which .Net
type/class is compatible to some C++ declaration/parameter in the
parameters. Is there something like a list or a documentation about this?
Boris
On Wed, 27 Apr 2005 12:37:17 +0300, Sergey Bogdanov wrote:
> I was using SHLoadImageFile [1] just for simplicity. It loads image file
> and returns its HBITMAP which I pass to WriteBitmapIntoJpegFile.
>
> To convert byte array with image into JPG file you have to use
> WriteRGBBytesIntoJpegFile P/Invoke. The last parameter is an array with
> length equals to height * width * 3 (where 3 bytes is RGB). I have
> updated JpegTest [2] now it also demonstrates how to use
> WriteRGBBytesIntoJpegFile function.
>
> [1]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/apippc/html/ppc_aygshell_thcu.asp
> [2]
> http://www.sergeybogdanov.com/Samples/JpegTest.zip
>
> Best regards,
> Sergey Bogdanov
> http://www.sergeybogdanov.com
>
>
> Boris Nienke wrote:
>> Thanks a lot!
>> I will look deeper into it when i'm back home.
>>
>> Currently i wonder what "SHLoadImageFile" exactly is/does and if it's
>> possible to do convertion to JPG with an in-memory bitmap. I will see
>>
>> Boris
>>
>> On Tue, 26 Apr 2005 19:35:39 +0300, Sergey Bogdanov wrote:
>>
>>
>>>I have written wrapper for IJG and now you can convert BMP file into JPG
>>>file. How it could be done see this example:
>>>http://www.sergeybogdanov.com/Samples/JpegTest.zip
>>>
>>>Best regards,
>>>Sergey Bogdanov
>>>http://www.sergeybogdanov.com
>>>
>>>
>>>Boris Nienke wrote:
>>>
>>>>yes - that's what i find whenever i start a new search about this topic.
>>>>
>>>>But isn't there anyone who has done this allready?
>>>>A DLL or something with some wrapper-class to do this with C#?
>>>>
>>>>I'm not a C/C++ guru - so writing a "wrapper around IJG" is not that easy
>>>>for me.
>>>>
>>>>I'm still hoping that someone out there has done this successfully and like
>>>>to share <hope hope hope> :-)
>>>>
>>>>Boris
>>>>
>>>>On Mon, 25 Apr 2005 16:54:38 +0300, Sergey Bogdanov wrote:
>>>>
>>>>
>>>>
>>>>>See this article:
>>>>>http://www.pocketpcdn.com/articles/savejpeg.html
>>>>>
>>>>>You might try to write wrapper around IJG library and then using
>>>>>P/Invoke call required methods to convert BMP to JPEG.
>>>>>
>>>>>Best regards,
>>>>>Sergey Bogdanov
>>>>>http://www.sergeybogdanov.com
>>>>>
>>>>>
>>>>>Boris Nienke wrote:
>>>>>
>>>>>
>>>>>>On Fri, 22 Apr 2005 08:54:41 +0200, Boris Nienke wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi,
>>>>>>>
>>>>>>>is there a function available (C# wrapper or something) to convert BMP file
>>>>>>>to a JPG file?
>>>>>>>i think i ask this once a year at least ;-) but i'm still hoping :)
>>>>>>>
>>>>>>
>>>>>>
>>>>>>Really no solution yet available?
>>>>>>Hard to believe....
>>>>>>
>>>>>>Boris
.
- Follow-Ups:
- Re: BMP to JPG (again)
- From: Sergey Bogdanov
- Re: BMP to JPG (again)
- References:
- BMP to JPG (again)
- From: Boris Nienke
- Re: BMP to JPG (again)
- From: Boris Nienke
- Re: BMP to JPG (again)
- From: Sergey Bogdanov
- Re: BMP to JPG (again)
- From: Boris Nienke
- Re: BMP to JPG (again)
- From: Sergey Bogdanov
- Re: BMP to JPG (again)
- From: Boris Nienke
- Re: BMP to JPG (again)
- From: Sergey Bogdanov
- BMP to JPG (again)
- Prev by Date: Re: Cannot step into unmanaged code from managed code
- Next by Date: Re: DLL "Registration" in .NetCF?
- Previous by thread: Re: BMP to JPG (again)
- Next by thread: Re: BMP to JPG (again)
- Index(es):
Relevant Pages
|
Loading