I create my own file format that could content many image files (jpg, ico,
....) . I can get the data of each image, and I want to display it on the
form. How can?
I've tried to create a file with the image data I want to show and open it
with that file name. No problem about this way. But I don't think it a good
way
Could anybody help me with another solution? 4 4058
Hi Dean,
Create a stream for each image and pass that stream to the Bitmap class'
constructor. I don't know your file format, but if you can't use the
original file stream you probably should create a memory stream then
transfer the image bytes form the file and pass that stream to the Bitmap's
constructor.
"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:eI******** *****@TK2MSFTNG P15.phx.gbl... I create my own file format that could content many image files (jpg, ico, ...) . I can get the data of each image, and I want to display it on the form. How can? I've tried to create a file with the image data I want to show and open it with that file name. No problem about this way. But I don't think it a good way Could anybody help me with another solution?
Dear Stoitcho Goutsev,
Could I ask one more question?
Q: How could we limite a [stream] just read specific scale in the file
before passing stream to [Bitmap]? As you know, I try to save a "image file"
my file format, so if I pass the stream with no limited, the [Bitmap] could
not read image useful infomation.
For example my file format:
/////////////////////////////////////////
0-255 : Image_name
256-264 : Image_size
265..n : Image_file
/////////////////////////////////////////
(n = 265 + Image_size)
The Bitmap just should read the stream from 265 to n byte. How could we do
that?
Thanks
-------------------------------------------------------
"Stoitcho Goutsev (100) [C# MVP]" <10*@100.com> wrote in message
news:uI******** ******@TK2MSFTN GP11.phx.gbl... Hi Dean, Create a stream for each image and pass that stream to the Bitmap class' constructor. I don't know your file format, but if you can't use the original file stream you probably should create a memory stream then transfer the image bytes form the file and pass that stream to the
Bitmap's constructor.
"Dean L. Howen" <co*****@hotpop .com> wrote in message news:eI******** *****@TK2MSFTNG P15.phx.gbl...I create my own file format that could content many image files (jpg,
ico, ...) . I can get the data of each image, and I want to display it on the form. How can? I've tried to create a file with the image data I want to show and open
it with that file name. No problem about this way. But I don't think it a good way Could anybody help me with another solution?
Hi Dean,
I haven't tested, but I'm pretty sure if you give the Bitmap construcotr a
stream with its pointer set to the 265th byte the bitmap will start reading
form there and will read as many bytes as it needs.
If you read your info part the pointer would be on the right position. If it
is not look at Stream.Seek method.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Dear Stoitcho Goutsev, Could I ask one more question? Q: How could we limite a [stream] just read specific scale in the file before passing stream to [Bitmap]? As you know, I try to save a "image file" my file format, so if I pass the stream with no limited, the [Bitmap] could not read image useful infomation.
For example my file format:
///////////////////////////////////////// 0-255 : Image_name 256-264 : Image_size 265..n : Image_file ///////////////////////////////////////// (n = 265 + Image_size)
The Bitmap just should read the stream from 265 to n byte. How could we do that?
Thanks
------------------------------------------------------- "Stoitcho Goutsev (100) [C# MVP]" <10*@100.com> wrote in message news:uI******** ******@TK2MSFTN GP11.phx.gbl... Hi Dean, Create a stream for each image and pass that stream to the Bitmap class' constructor. I don't know your file format, but if you can't use the original file stream you probably should create a memory stream then transfer the image bytes form the file and pass that stream to the Bitmap's constructor.
"Dean L. Howen" <co*****@hotpop .com> wrote in message news:eI******** *****@TK2MSFTNG P15.phx.gbl... >I create my own file format that could content many image files (jpg, ico, > ...) . I can get the data of each image, and I want to display it on > the > form. How can? > I've tried to create a file with the image data I want to show and open it > with that file name. No problem about this way. But I don't think it a > good > way > Could anybody help me with another solution? > >
Dear Stoitcho Goutsev,
it seems not work.
I try to append the existing image file with some bytes, it still works, but
not if I add some byte in the header although I have seek to the right
position
---------------------------------------------------------
"Stoitcho Goutsev (100) [C# MVP]" <10*@100.com> wrote in message
news:#S******** *****@TK2MSFTNG P11.phx.gbl... Hi Dean,
I haven't tested, but I'm pretty sure if you give the Bitmap construcotr a stream with its pointer set to the 265th byte the bitmap will start
reading form there and will read as many bytes as it needs. If you read your info part the pointer would be on the right position. If
it is not look at Stream.Seek method.
-- HTH Stoitcho Goutsev (100) [C# MVP] "Dean L. Howen" <co*****@hotpop .com> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Dear Stoitcho Goutsev, Could I ask one more question? Q: How could we limite a [stream] just read specific scale in the file before passing stream to [Bitmap]? As you know, I try to save a "image file" my file format, so if I pass the stream with no limited, the [Bitmap] could not read image useful infomation.
For example my file format:
///////////////////////////////////////// 0-255 : Image_name 256-264 : Image_size 265..n : Image_file ///////////////////////////////////////// (n = 265 + Image_size)
The Bitmap just should read the stream from 265 to n byte. How could we
do that?
Thanks
------------------------------------------------------- "Stoitcho Goutsev (100) [C# MVP]" <10*@100.com> wrote in message news:uI******** ******@TK2MSFTN GP11.phx.gbl... Hi Dean, Create a stream for each image and pass that stream to the Bitmap
class' constructor. I don't know your file format, but if you can't use the original file stream you probably should create a memory stream then transfer the image bytes form the file and pass that stream to the Bitmap's constructor.
"Dean L. Howen" <co*****@hotpop .com> wrote in message news:eI******** *****@TK2MSFTNG P15.phx.gbl... >I create my own file format that could content many image files (jpg, ico, > ...) . I can get the data of each image, and I want to display it on > the > form. How can? > I've tried to create a file with the image data I want to show and
open it > with that file name. No problem about this way. But I don't think it
a > good > way > Could anybody help me with another solution? > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tyrone Slothrop |
last post by:
I am coding a site which involves uploading images. All of the PHP
and display is OK but the client wants to be able to display the image
thumbnail on the upload page and show the full image on mouseOver
instead of the popup I coded. The section of code below works
perfectly in Firefox but not at all in IE (why am I not surprised?).
The page is nearly 100% dynamic, so this is extracted from the source
of a test page. The code in...
|
by: Kevin Myers |
last post by:
Hello,
Please forgive my reposting of this note with hopefully a more relevant
subject line.
On an Access 2000 form under Windows 2000 I would like to use a Kodak Image
Edit Control to display the contents of a TIFF image file. According to the
very limited documentation that I have been able to locate so far, all I
should need to do is to drop the Image Edit Control onto the form in design
mode, set the control's Image property to...
|
by: Peter Lapic |
last post by:
I have to create a image web service that when it receives an imageid
parameter it will return a gif image from a file that has been stored on the
server.
The client will be an asp.net web page that calls the web service to render
a vertical strip of images.
After doing some research I am unable to find some vb.net code that can
assist in what I want to achieve.
The closest thing I found was
|
by: DoomedLung |
last post by:
I have been developing an image gallery which needed to be dynamic as
possible.
so I have placed the gallery in a div plus a div containing the large
image to be displayed. It works by changing the display property of the
gallery div to 'none' and the largeImage div to 'block' which has an
affect of switching pages but obviously saving time developing a single
page for each large Image, but (cliche') when I refresh the page the
with the...
|
by: DoomedLung |
last post by:
I have been developing an image gallery which needed to be dynamic as
possible.
so I have placed the gallery in a div plus a div containing the large
image to be displayed. It works by changing the display property of the
gallery div to 'none' and the largeImage div to 'block' which has an
affect of switching pages but obviously saving time developing a single
page for each large Image, but (cliche') when I refresh the page with
the...
| |
by: den 2005 |
last post by:
Hi everyone,
Here is code working on..Trying to insert record with a column with Image
or VarBinary datatype in sql database from a existing jpeg image file, then
retrieve this image from database and display it in a Image web control
dynamically(at runtime).
The process after being displayed in the web control, user click insert/add
button, it converts the image(jpeg) file to bytes and store it the database
with Image or VarBinary...
|
by: c676228 |
last post by:
Hi everyone,
I have a piece of code in sales.aspx.vb like this:
Protected WithEvents Message As System.Web.UI.WebControls.Label
Try
...
ChartImage.ImageUrl = "ChartGenerator.aspx?" + DataStr + "&ChartType=" +
drpChartType.SelectedItem.Value.ToLower() + "&Print=" +
printVersion.ToString()
...
Catch e As Exception
|
by: adubra |
last post by:
Hi there,
I am using a device context (DC) and a buffer to successfully draw to screen. However, when I update the DC at very high frame rate and drag the frame containing the image very quickly over the screen or I drag another window on top of the fast display, I get errors (Pyassertion ....). I believe those are related to a conflict between the thread that is updating the buffer (over which I have control) and the thread that is doing the...
|
by: nanaalwi |
last post by:
Hi,
Currently I'm developing a software using VB.net that can grab an image using Matrox Morphis card and display it in a PictureBox. The software can grab the image already and display it in the form (Imports Matrox.ActiveMil). But the problem is I need to display the image in the PictureBox but I don't know how.
The coding to grab the image is as follows:
ActiveMILApplication = CreateObject("MIL.Application")
|
by: amritranjan |
last post by:
How to retrive image file from MS access database and display this in another JSPpage
--------------------------------------------------------------------------------
This is my Jsp code for image upload in database:
-----------Upload.jsp----------------
<html>
<head>
<title>Account Details </title>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |