Click here to Skip to main content
15,905,233 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Hot to read uncommon picture format? Pin
Luc Pattyn4-Aug-09 1:16
sitebuilderLuc Pattyn4-Aug-09 1:16 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 6:26
Sonhospa4-Aug-09 6:26 
GeneralRe: Hot to read uncommon picture format? Pin
Luc Pattyn4-Aug-09 6:52
sitebuilderLuc Pattyn4-Aug-09 6:52 
I don't think a stream will work, IIRC new Bitmap(stream) tends to rewind the stream before processing it. What you should consider is this:

declare an array of bytes, fill it with pixel data from the stream; then use the GCHandle class to pin it and get the IntPtr, then use the Bitmap constructor. All this assuming the data is layed out in a way that matches one of the supported pixelformats.

if not, you have to:
- either fill the byte array yourself in an acceptable pixelformat;
- or use SetPixel (which is bound to be slower).

BTW: I'm not sure what the division by 10 is doing in Dim width As Integer = (2048 / 10); if you hope to resample the image while loading, that has zero success probability. Load it as is, then do whatever you have to to it.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 8:32
Sonhospa4-Aug-09 8:32 
GeneralRe: Hot to read uncommon picture format? Pin
Luc Pattyn4-Aug-09 8:44
sitebuilderLuc Pattyn4-Aug-09 8:44 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 9:47
Sonhospa4-Aug-09 9:47 
AnswerRe: Hot to read uncommon picture format? Pin
Steven J Jowett4-Aug-09 3:49
Steven J Jowett4-Aug-09 3:49 
GeneralRe: Hot to read uncommon picture format? Pin
Sonhospa4-Aug-09 6:31
Sonhospa4-Aug-09 6:31 
Questionconnecting gmail using IMAP in VB.NET? Pin
nevincm3-Aug-09 21:16
nevincm3-Aug-09 21:16 
AnswerRe: connecting gmail using IMAP in VB.NET? Pin
Mike Ellison4-Aug-09 3:17
Mike Ellison4-Aug-09 3:17 
QuestionBest practices for common routines Pin
supercat93-Aug-09 12:36
supercat93-Aug-09 12:36 
AnswerRe: Best practices for common routines Pin
Christian Graus3-Aug-09 13:39
protectorChristian Graus3-Aug-09 13:39 
AnswerRe: Best practices for common routines Pin
Mycroft Holmes3-Aug-09 13:56
professionalMycroft Holmes3-Aug-09 13:56 
GeneralRe: Best practices for common routines Pin
supercat94-Aug-09 5:46
supercat94-Aug-09 5:46 
GeneralRe: Best practices for common routines Pin
nlarson114-Aug-09 7:13
nlarson114-Aug-09 7:13 
GeneralRe: Best practices for common routines Pin
Mycroft Holmes4-Aug-09 16:08
professionalMycroft Holmes4-Aug-09 16:08 
QuestionVB-Access: Syntax error in INSERT INTO command Pin
Amanjot3-Aug-09 10:58
Amanjot3-Aug-09 10:58 
AnswerRe: VB-Access: Syntax error in INSERT INTO command Pin
Christian Graus3-Aug-09 11:17
protectorChristian Graus3-Aug-09 11:17 
AnswerRe: VB-Access: Syntax error in INSERT INTO command Pin
Paramu19733-Aug-09 21:16
Paramu19733-Aug-09 21:16 
AnswerRe: VB-Access: Syntax error in INSERT INTO command Pin
Hristo-Bojilov4-Aug-09 7:34
Hristo-Bojilov4-Aug-09 7:34 
QuestionList all active windows Pin
NewbieDave3-Aug-09 10:02
NewbieDave3-Aug-09 10:02 
AnswerRe: List all active windows Pin
Christian Graus3-Aug-09 10:32
protectorChristian Graus3-Aug-09 10:32 
AnswerRe: List all active windows Pin
Dave Kreskowiak3-Aug-09 10:36
mveDave Kreskowiak3-Aug-09 10:36 
GeneralRe: List all active windows Pin
Christian Graus3-Aug-09 10:44
protectorChristian Graus3-Aug-09 10:44 
GeneralRe: List all active windows Pin
NewbieDave3-Aug-09 11:05
NewbieDave3-Aug-09 11:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.