PC Review


Reply
Thread Tools Rate Thread

Creating JPEG using Bitmap()

 
 
Darkvisor
Guest
Posts: n/a
 
      1st Mar 2004
Hi,

I'm trying to display a JPEG image which I have in a memory stream.
I'm using

Bitmap img = new Bitmap( imgStream );

This works fine when I target an XP box but fails to decode the JPEG
correctly when I target the Compact Framework and use the Pocket PC
2002 & 2003 emulator. The JPEG is decoded without error but of the
wrong size. It should be 8 wide by 10560 high but usually is 7 wide by
9926 high, this varies depending on the actual image contents. Actual
error is Wrong Arg. when I call GetPixel.

Has anyone got an answer for this? I'm I going mad?

Cheers

Dave.
 
Reply With Quote
 
 
 
 
Alex Yakhnin [MVP]
Guest
Posts: n/a
 
      1st Mar 2004
Take a look at this thread:

http://www.google.com/groups?hl=en&l...dm=052f01c37d1
5%24b42dee00%24a001280a%40phx.gbl&rnum=22&prev=/groups%3Fq%3DJPEG%2Bgroup:*c
ompactframework%26start%3D20%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26s
elm%3D052f01c37d15%2524b42dee00%2524a001280a%2540phx.gbl%26rnum%3D22
--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org

"Darkvisor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I'm trying to display a JPEG image which I have in a memory stream.
> I'm using
>
> Bitmap img = new Bitmap( imgStream );
>
> This works fine when I target an XP box but fails to decode the JPEG
> correctly when I target the Compact Framework and use the Pocket PC
> 2002 & 2003 emulator. The JPEG is decoded without error but of the
> wrong size. It should be 8 wide by 10560 high but usually is 7 wide by
> 9926 high, this varies depending on the actual image contents. Actual
> error is Wrong Arg. when I call GetPixel.
>
> Has anyone got an answer for this? I'm I going mad?
>
> Cheers
>
> Dave.



 
Reply With Quote
 
Anthony Wong [MSFT]
Guest
Posts: n/a
 
      12th Mar 2004
Can you attach a piece of code reproducing the problem as well as the JPEG
file you stored in the MemoryStream? Thanks.

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bitmap-jpeg vince Windows XP General 7 15th Aug 2004 11:56 AM
Jpeg/Bitmap JrWoods Windows XP Photos 1 21st Mar 2004 07:21 PM
bitmap or jpeg shaun Windows XP Basics 2 14th Nov 2003 10:13 PM
bitmap vs jpeg jim homoki Windows XP Photos 0 13th Sep 2003 09:27 PM
bitmap to jpeg mickey Windows XP General 1 2nd Aug 2003 07:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:56 PM.