473,414 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

What type of image is this?

I have been trying to reverse engineer a small hardware scanning device. The vendor has a DLL with a function called "GetImageData" that I've been executing in VB.NET

It is defined as below:

Expand|Select|Wrap|Line Numbers
  1. GetImageData(imageData_out as String, pWitdh as Uinteger, pHeight as Uinteger) as Boolean

Right after calling the function I execute the following:
Expand|Select|Wrap|Line Numbers
  1. Text.ASCIIEncoding.Default.GetBytes(imageData_out)
Which always returns an Array of 8192 bytes (regardless of the width, height). After looking at the byte array I noticed only following 10 numbers re-occurring:

Byte - # occurrence in array
63 -> 3894
0 -> 2677
32 -> 592
255 -> 313
64 -> 302
96 -> 221
160 -> 81
134 -> 71
192 -> 65
48 -> 21

This is typical with each scan with some variation in the counts.

I am assuming that it returns some sort of BITMAP image. Possibly black and white with representation of how dark or light each pixel is? Anybody have an idea what type of image is being returned, or how I can go about displaying the data that comes back as an image?
Jun 30 '10 #1
6 1540
Frinavale
9,735 Expert Mod 8TB
Contact the vendor and get their documentation on the SDK that they have provided to you.
Jun 30 '10 #2
Well that's the worst part of it all. The vendor doesn't exist anymore, and their is no documentation or SDK, just a DLL that is used by their application. This is just a shot in the dark at reverse engineering their product.
Jun 30 '10 #3
Plater
7,872 Expert 4TB
Is this really the case: imageData_out as String
I can't believe (even with VB) that someone would return data as a string like that?
Jun 30 '10 #4
@Plater
my thoughts exactly.. When I imported the DLL that's what the object browser reports it as. I assume it's a IntPtr to the image data but not quite sure how to construct the image. After digging around I believe it would be a 8bpp image.
Jun 30 '10 #5
Plater
7,872 Expert 4TB
Have you tried creating a Bitmap class from it?
You can make a MemoryStream from a byte[] and try to construct the Bitmap object with it using Bitmap.FromStream(myMemoryStream)

See if it can figure it out?
Jun 30 '10 #6
@Plater
"It throws a Parameter is not valid" exception when trying to read from the stream.

:(
Jun 30 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Colin Steadman | last post by:
I have two buttons on my form and need to know which was clicked. If I setup the buttons like this: <input type="submit" value="submit" name="submit_to_array"> <input type="submit"...
4
by: Csaba2000 | last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE 5.5+). This should work regardless of whether IE has focus. Normally you would...
1
by: Brian Genisio | last post by:
Hi all, I noticed that the image input type does not show up in the elements array (IE 6.0). <FORM name=myForm> <INPUT name=rads id=check1 type=radio value=val1> <INPUT name=rads id=check2...
2
by: jw56578 | last post by:
if i have an Input type Image how am i suppose to programatically submit it through JS. code: <INPUT type="text" onkeyup="javascript:if(event.keyCode==13){btnClick.click();}"> <INPUT...
1
by: champ.supernova | last post by:
Hi, I have a form which has a few different submit links, all of type image. This is critcal to the operation of the form, as it relies on the image co-ords being passed to another page, the...
3
by: John Salerno | last post by:
I think I might create an enumeration with the values Off, Red, Yellow, Blue, and Overloaded and I might use this for bitwise comparison. So, when initializing the arrays, if I wanted to load the...
4
by: Joergen Bech | last post by:
Whenever no controls are selected in the VS.Net 2003 webforms designer, the Properties box defaults to "DOCUMENT", which allows me to set properties such as bgColor, bgProperties, bottomMargin,...
2
by: jon | last post by:
Hi This might be an easy one to answer but I have a web form in an ASP.NET 1.1 application with a hand-rolled HTML image button as follows which opens a help guide in a new window: <input...
3
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image'...
8
by: John | last post by:
Hi Pasrt of HTML - <div class='button'><input type='image' src='/images/check1.jpg'></input></div> Part of CSS - ..button {background-image: url(/images/check1.jpg); background-repeat:
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.