Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Create BLOB's Image Thumbnail


After searching through the forums it seems there is no topic discussing how to create a thumbnail of a picture you store into a BLOB Field in Access...

Is there a way to create a thumbnail of a picture stored in a MSSQL (or Access' OLE Object) BLOB?

I was wondering if when storing the picture into the DB you can manipulate the data to make a thumbnail (using an algorithm to create it, of course) and store it into a different field or if when retrieving the data from the field to manipulate the stream and turn it into a thumbnail before displaying it?

Thanks in advance for your replies




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Show The Image That Store As BLOB Type On Image Object?
I want to show the picture that be stored in BLOB data type. How can I do?

How To Create A Thumbnail
I have a folder with photos and whant to create thumbnail to the slide in Powerpoint.
The problem is how to resize the image from 800*600 to 80*60 (for example)
Will gdi32 help me and haw to use it?

Please help me

How To Create A Thumbnail Of A Web Page?
Hi All,

I would like to create a thumbnail of a web page. I've tried the following code, but what I get is a thumbnail of the screen.

...
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "http:\...." 'My URL
ie.Visible = True
hdc = GetDC(ie.hwnd)
lRet = StretchBlt(Picture1.hdc, 0, 0, 3000, 3000, hdc, 0, 0, 3000, 3000, vbSrcCopy)
...

Thanks in advance for any help.

Roberto

How To Create .avi And Mpeg Video Thumbnail
Hi all. could any one show me how to make video thumnail of .avi and .mpeg file using vb6?Thanks

Resize Image And Save As Thumbnail
Hii to all

I an image in picture box and it fits in it well, but now the problem is that i want to save the original image according to size of my imageviewer in different location or may be in database

plz reply soon if anyone could help

Kodak Image Thumbnail Control
Has any used the thumbnail control to move images from one position to another?  
For example, using the control to move page/position 3 and dragging or dropping it to page/position 7.

Thanks.

Thumbnails - How Do You Convert An Image To A Thumbnail?
Does anyone know of any dll or code available (preferably freeware) that will convert a bitmap to a thumbnail, or alternatively, whether you can use any of the thumbsplus dll's to do this (and distribute them)?

Image Thumbnail Sample Code
I find the web have VB Image Thumbnail Sample Code, very useful
http://viscomsoft.esmartweb.com/

Blob To Image
hello!

i have images saved on a blob field in my access database, and i load them in a form, in a control image.

I need to save this images into an image file, where the user defines the type of file and the path.

But i don't know if it's better to save into image directly from the control image or from the blob field, and i don't know how to do it!!!. It is also no a good thing to create temporal files.

Any ideas?? thanks

Image Resize (and Video Optionaly) And Thumbnail Creation (tif, Jpg, Gif, Bmp Etc)
I need a program or a library even better (free) where you just input or pass as parameters the following:
- a source of images folder
- an output folder
- size (width, height)
- output format (jpg, gif, bmp etc)

and it creates new graphic files (thumbnails) into the given output folder, with the specified width and height and image format.

Optional features:
- Recursive directory scan and creation of thumbs
- Returns image size, file size, creation date, for every picture into source images folder so we can write it into a database
- Can find also video format files (avi, mov, mpeg etc)
- name prefix for each thumbnail

Thanx in advance for any help,
Dimitris Siskopoulos

PS: I have found some libraries over the net, but none of them can do what i need and some of them are not free.

Image Resize (and Video Optionaly) And Thumbnail Creation (tif, Jpg, Gif, Bmp Etc)
I need a program or a library even better (free) where you just input or pass as parameters the following:
- a source of images folder
- an output folder
- size (width, height)
- output format (jpg, gif, bmp etc)

and it creates new graphic files (thumbnails) into the given output folder, with the specified width and height and image format.

Optional features:
- Recursive directory scan and creation of thumbs
- Returns image size, file size, creation date, for every picture into source images folder so we can write it into a database
- Can find also video format files (avi, mov, mpeg etc)
- name prefix for each thumbnail

Thanx in advance for any help,
Dimitris Siskopoulos

PS: I have found some libraries over the net, but none of them can do what i need and some of them are not free.

Image Box, Thumbnail And How To Open Form Pixels And Twips
how do i make it so when a user clicks on a thumbnailed image, it opens a new form as big as the width and height of the image.

i have the width and height that i read from a database but the form opens in twips and not in pixels????

Image-Type Field (BLOB)
Hi,

I have a project to do here. I successfully insert and read an image-type field for my .WMF files.

But it doesn't work for my .DWG files. I successfully insert the data in the field (well I think because it doesn't give me an error)<
But I can't read the image in the same fashion I do for the .WMF. When I open the file with AutoCad, I get an error.

Anyone has an idea of how to read .DWG files from image-type fields?




Forget this ... my mistake. I was not appending the last chunk so my picture was incomplete.



Edited by - ndbu on 8/25/2005 12:57:33 PM

Mysql Blob To Mssql Image Field Through VB
heloo friends ----

marray x'mas n happy new year


can some body help me out here ---->>

i have mysql table which contain blob field (for saving pdf file)

so now i want to transfer records from mysql to mssql through vb.

i tried but its not working.

when i tried through import export wizard its working


so can some one help me out





thanks for u r help in advance


n once again marry x'mas n happy new year

Insert BMP Image To Oracle Blob Datatype
I am facing the following problem, i have to insert a bmp image into the oracle database in the column which has blob as datatype. i want to do this by not using oracle ole db driver for the connection string. does any body know how can i proceed with the same for establishing the connection with oracle odbc driver in the connection string. i want to do the above application in visual basic. kindly help?

Thanks and Regards
Ashwin

Unable To Save Blob Image Into Proper Bitmap
Hey guys/gals,

I am doing system integration with another program which saves its data into a database. I am trying to extract a bitmap picture from a database. It is saved as a blob data in an Access database. I have tried extracting the data out and saving it in the file. Only problem is, the resulting image file always seems to be missing 14 bytes short of a proper bitmap image. (The owner program has an import function which saves the data properly into a good image file and I compared the filesize between my extracted file and the good image file. It always misses 14 bytes)

I speculate its because the data stored inside the database is missing the bitmap header information. Would appreciate any suggestions or thoughts you folks can give me on saving it into a proper bitmap? Any sample of codes of doing this or pointers ?

It is quite urgent for me to complete this by the weekend and would appreciate any help at all...

Help !

How Do I Retrieve Image Blob From Oracle Database To Folder
hey i have a problem here, i have a Oracle Database, inside it contain a blob, where all my images are stored.

but now i need to retrieve it out and put it in a folder...how do i do that.

from resources i have read, they say i need to convert the blob to binary before it can be retrieve out.

may i know the coding...that can do that
i have one example:

Set Sm = New ADODB.Stream
Sm.Type = adTypeBinary
Sm.Open
Sm.Write Rs!ATTACHMENT
Sm.SaveToFile "C:TempTrial20.doc", adSaveCreateOverWrite
Sm.Close
Rs.Close

and this is my own coding:

Private Sub btnGetImages_Click()
Dim arrByte() As Byte
Dim strFilePath As String
strFilePath = App.Path & "img"
Dim strImageName As String
Dim arrImgData() As Byte

On Error Resume Next
'create the directory if it does not exists
If Dir(strFilePath) = "" Then
MkDir strFilePath
End If

'position the recordset on the first recordset
objRs.MoveFirst
Do While Not objRs.EOF
'Read the record from the database
strImageName = objRs("PicName")
'create the file
Open strFilePath & strImageName For Binary As #1
arrImgData = objRs("Image").GetChunk(objRs("Image").ActualSize)
'Write to the file
Put #1, , arrImgData
Close #1
'move on the next record
objRs.MoveNext
Loop
MsgBox "Done"

RetrieveAllImagesFrm.Hide
End Sub



so i can add the code inside my own coding...

Ah Xing

Oracle BLOB (image) Fields With RdoResultset Objects
I have an Oracle database with a table that contains a BLOB field. I want to keep photos in this field and I cannot figure out how to insert a picture into this field from VB6 GUI using a rdoResultset object or other type of DB objects. Please help!!!!!!!
Thanks

Insert Image Files Into A Blob Column In MySQL Using Object Command
Dear friends,

I'm using the code BELOW to insert a image file into a Blob column in MySQL:
################################################
......
mystream.Type = adTypeBinary
rs.Open "SELECT * FROM fotos WHERE 1=0", conexao, adOpenStatic, adLockOptimistic
rs.AddNew
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
rs!FOTO = mystream.read
rs.Update
mystream.Close
rs.Close
......
################################################
The code ABOVE is working so fine, and the image is been stored in mysql with success, but I want to use Object Command to Insert the Image, but when I try to insert using object command the system returns an error:
Run-time error '-2147217904 (80040e10)'
How I do to use object command and insert images?
The code using object command is here:
################################################
.....
mystream.Type = adTypeBinary
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
With cmd
.Parameters.Refresh
.ActiveConnection = conexao
.CommandType = adCmdText
.CommandText = "INSERT INTO fotos (foto) VALUES (?)"
'.Parameters.Append .CreateParameter("@1", adBinary, adParamInput, , mystream.read)
.Prepared = True
.Execute
End With
mystream.Close
.....
################################################

Insert Image Files Into A Blob Column In MySQL Using Object Command
[font=Arial]Dear friends,

I'm using the code BELOW to insert a image file into a Blob column in MySQL:
################################################
......
mystream.Type = adTypeBinary
rs.Open "SELECT * FROM fotos WHERE 1=0", conexao, adOpenStatic, adLockOptimistic
rs.AddNew
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
rs!FOTO = mystream.read
rs.Update
mystream.Close
rs.Close
......
################################################The code ABOVE is working so fine, and the image is been stored in mysql with success, but I want to use Object Command to Insert the Image, but when I try to insert using object command the system returns an error:
Run-time error '-2147217904 (80040e10)'
How I do to use object command and insert images?
The code using object command is here:
################################################
.....
mystream.Type = adTypeBinary
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
With cmd
.Parameters.Refresh
.ActiveConnection = conexao
.CommandType = adCmdText
.CommandText = "INSERT INTO fotos (foto) VALUES (?)"
'.Parameters.Append .CreateParameter("@1", adBinary, adParamInput, , mystream.read)
.Prepared = True
.Execute
End With
mystream.Close
.....
################################################[/FONT]

Storing And Retrieving Image/Picture In BLOB Field Of Oracle Database
Can anybody help me by providing detail code of storing and retrieving Image/Picture in BLOB field of Oracle database?

How Can I Save An Image From A BLOB Field (of ADODB.rs) To A File At Local Drive ?
How can i save an image from a BLOB field (of ADODB.rs) to a file at local drive ?

Any Expert Here (mysql To Mssql - Blob To Image Data Type Conversion)
heloo friends --------- >>>


i want to convert my table from mysql to mssql.

in mysql table i have blob field (containing .pdf document) which i want to convert to mssql image field.

i tried this by using (import export wizard in mssql) and its working fine .

but when i transfer it using vb it transfering but when i try to open that its giving me an error ----

Read A Blob, Modify It, Write A Blob??
Don't know if this is the right forum, but.....

Does anyone know if you can read a blob to a recordset, modify it, and then write the blob back to differnet blob?

I know you can write a blob to a file, and then dink around with the file prior to shooting it back to a blob somewhere, but I am interested in doing this all in recordsets and memory, if at all possible.

If anyone has an idea, comment or suggestion, would you please share it with me? Thanks in advance!!

How To Create GIF Image ?
[font=verdana]Hello to all Forum Members ;

For last many days , Im trying to find some VB information about how to create a GIF image through Visual Basic Source code. But I couldn't find anything.

Please help me to learm this aspect. I have seen many third party GIF Animator Software Tools and wanted to develop something similar on my own. But till the time , I couldn't figure out the technique they use for creation of GIF image.

If you have any source code or suggestion or link then please send that to me and help me to improve my Programming Skills.

Thanks ,

Ruturaj.

Create An Image
i want when i press a command button an image is created in the form, so how can i do that?

How To Create Image Map In VB
Hi all,

I am developing an application in VB which faciliates area search. I want to include a map, and generate a search based on the location clicked on the map. I have now implemented this using the scriplet control and image maping functions of html. The images are very huge around 12MB -15MB and it takes a lot of time to load, also the scriptlet controls url property cannot be set at runtime. So I have to use different scriptlet controls for each zoom level. Is there a way by which it can be done in VB itself using image box or any other control which will be faster.

Regards
Rajakumar.S

Create Cd Image
i want to create an image of a cd , as it is . (a winiso and other software do).i know it's not so easy but but possible . i tried a search but cant find much code on psc except flamedcd . hope anyone can give me a code , activex or atleast a way on how to do it.

Can't Create Autoredraw Image
I am create vb 6 program for image processing with PictureBox object.

The Program running well until when i am using high resolution image 4232 x 2539 pixels with size 7.85 MB, raise error "Runtime error 480: Can't create AutoRedraw image".
I have searching on internet but did not help me to define the problem. Here my code :

Public Function GetTrueBits(pb As PictureBox, abPicture() As Byte, BI As BITMAPINFO) As Boolean
Dim bmp As BITMAP
Call GetObjectAPI(pb.Picture, Len(bmp), bmp)
ReDim BI.bmiColors(0)
With BI.bmiHeader
.biSize = Len(BI.bmiHeader)
.biWidth = bmp.bmWidth
.biHeight = bmp.bmHeight
.biPlanes = 1
.biBitCount = 24
.biCompression = BI_RGB
.biSizeImage = BytesPerScanLine(.biWidth) * .biHeight
ReDim abPicture(BytesPerScanLine(.biWidth) - 1, .biHeight - 1)
End With
GetTrueBits = GetDIBits(pb.hDC, pb.Picture, 0, BI.bmiHeader.biHeight, abPicture(0, 0), BI, DIB_RGB_COLORS) 'this is line where the error raise - pb.hDC
End Function

Really appriate for help, because i need to finish this program ASAP.

How To Create An Image... In Runtime
how can I make an image box, then assign it an image in runtime in VB6?

Thanks

-compuXP

Can't Create AutoRedraw Image?
Yo as the title implies .... how do i avoid this error when trying to draw something to a large picture box?

Cannot Create Autoredraw Image
I have the following methods in my procedure:

Code:
Sub AlignScrollBars()
If Me.ScaleHeight <> 0 And Me.ScaleWidth <> 0 Then
' Resize the scrollbars
HScroll.Width = Me.ScaleWidth - lblFiller.Width
VScroll.Height = Me.ScaleHeight - lblFiller.Height - 1170

' Reposition the scrollbars
HScroll.Left = 0: HScroll.Top = Me.ScaleHeight - HScroll.Height
VScroll.Top = 1170: VScroll.Left = Me.ScaleWidth - VScroll.Width

' Reposition the PictureBox
Picture1.Top = (-1 * VScroll) + 1170
Picture1.Left = (-1 * HScroll)

' Reposition the Picturebox label by scrollbars
lblFiller.Top = VScroll.Height + VScroll - 30
lblFiller.Left = HScroll.Width + HScroll - 30

End If

End Sub


Private Sub Form_Resize()
AlignScrollBars
'Picture1.Move 0, 44, ScaleWidth, ScaleHeight
End Sub

Private Sub HScroll_Change()
AlignScrollBars
End Sub

Private Sub VScroll_Change()
AlignScrollBars
End Sub

' Draw the shape in the area defined by the points
' (m_X1, m_Y1) and (m_X2, m_Y2).
Private Sub DrawShape()
Picture1.Line (m_X1, m_Y1)-(m_X2, m_Y2), , B

End Sub


If I remove the line "Picture1.Move 0, 44, ScaleWidth, ScaleHeight", I get the following error: "Cannot create autoredraw image". The error occurs when I draw a rectangle with the mouse using the method DrawShape.
If I keep it the scroll does not work properly and the Form underneath the picture appears.
Does anyone have any suggestion to fix this anomaly

Create Image At Runtime And Put It On Top
I'm creating an image at runtime... but all the other images that I'm creating are beneath this one.. and it cannot be seen (supposing the first image is big). I want that the last image I create to be on top on the other ones.
Here is the code for creating the image at runtime:


Code:
Private WithEvents imagine As Image

Set imagine = cata.Controls.Add("VB.Image", "Imagine" & index_imagine)

index_imagine = index_imagine + 1

If chkStrech.Value = 1 Then
imagine.Stretch = True
End If

With imagine
.Visible = True
.Left = txtLeft.Text
.Top = txtTop.Text
.Width = txtWidth.Text
.Height = txtHeight.Text
.Picture = LoadPicture(txtPicture.Text)


End With

Dynamicly Create Image
Hello again
i'm creating image controls dynamicly to load images from a folder.
i'm having no trouble with this.
my problem is moving the control to the right position. this is because i need to make a line of 4 images and then go to the next row. can someone help me?
thanks

Create New Image Box At Runtime
I have a program that needs to create a new image box at runtime, anyone have any ideas?

Edit

I searched but nothing really helped me.

Create Text As Image ..is It Possible ??
Hi

long time no questions

ok, i heared that i can make the text in text box appear as a picture!

you know what i mean?

i want (after pressing a command button) the words in the text box appears in the picture box like bitmap or jpg or what ever !

is it possible or its just another dumb question from a newbie :>

thanks

Can't Create AutoRedraw Image
Hi,

I have an application in which I print to a series of picture boxes (around 20 of them), all of whose AutoRedraw property is set to true. I encountered a "Cant create AutoRedraw Image" error at pic box no.11. Strangely, if I catch the error and continue with printing on the 12th pic box onwards, the printing continues as usual. The 12th pic box shows up with its image normally.

I was thinking this error occurs when the system cannot allocate any more memory for the persistent bitmaps. If it cannot, how did the 12th pic box get its image? Can anybody offer an explanation to this behavior? Is there any gap in my understanding? Please help.

Thank you.

Create Image Using Only Code
hello, I was experimenting with VB not long ago and I discovered that I could declare a variable as an object type (image, label, picturebox, etc). [Dim x as image] Then an idea came to me and I was wondering whether it was possible to actually CREATE the image through declaring a variable and so on and using only code? Thanks, any light would be great!!!

Create A Negative Image?
Hello,

I was wondering if anyone has a code sample or idea of how to create a "negative" image.

Thanks!

How To Create A Cd Image(just Help With The Code)
i wantto create image of a cd through vb as winiso does.there is a code named flamed cd (for cd writing) which creates an image of thecd before writing a data disc. can anyone help me with the code.

How Do You Create An Image Box With Code?
Hello, I'm new to these forums. My name is Josh, and my alias is obviously "The Pinball Wizard", after the The Who song. Anyway, I was wondering if there was a way to create an image box and place it somewhere with code. Kind of like the "ctrl-D" duplicate function of most windows programs. Also, since this is the first year I've been taking VB, and my teacher doesn't know a lot of the more advanced things, please elaborate on some of the more advanced code (if there is any), thanks.

What Software To Create This Image ?
I wonder which software use to create this box. I see this on web but the author didn't want to share it. Anyone please tell me.
I write a program in VB and decide to use this kind of picture to promote.

Create A Image From A Richtextbox
hi!!

I got a textbox with 2500 values of pixels from a matrix 50x50,they are separated by " "

How i create a image with those values??

thanks!

Cant Create AutoRedraw Image
I have a image and I load it into the file. Its HUGE.

It cant get the memory to create the image.
How do I work around this?

How Do You Create A New Image During Run Time Using VB3?
How do you create a new image during run time using VB3? Does anyone know the code?

Create BMP Image Of A Form
I have a form that contains a map, a chart, and a listbox. At runtime, I want to create a bitmap file that is an image of the form after the map and chart are created. Does anybody have any suggestions how to do this?

Thanks.

Can't Create AutoDraw Image
Hello,

I wrote a program which displays an A3 page (210cmX420cm). since it does not fit into the screen, i resize the image using StretchBlt. The image is quite big. 5MB BMP file.

One invisiable picture box holds the original, and the other holds the visible. On both picture boxes, the AutoDraw property is set to true.

On some PC's (win2000 in my case), sometimes i get errro 480 "Can't create AutoDraw Image".

Looking at the MSDN it says it has to do with GDI memory, and that i should turn the AutoDraw off. But if i do that, StretchBlt is not working correctly.

Can anyone suggest another way of doing this this, or know why i am getting this error? From what i read on MSDN it was common on 98, where GDI was allocated 64MB, but should not happen really on 2000 or NT.

Thank you.

Please Help! How Do I Create An Image File (.bmp, .jpg Any Will Do!) Out Of A String?
Hello all

I am working on a project which requires me to build an image from the following:

the data provider sends the information for an

"image is sent as multiple strings, each string consists of up to 512 characters, where 'each character pair represents a byte in the .img file. Each character value
will be "A" + the value of each nibble (4 bits)"

(Enclosed in quotes cause it's the provider's description, not mine)

Can anyone give me advice on how to take this string data and convert into an image file format such as .jpg, etc.

Many, many thanks to anyone who can help!

Create Context Sensitive Image
Hi,

I'm drawing a large flow on a memory-bitmap.
After the rdawing is complete I put it in a picturebox wich works fine.
The problem is that is a user clicks on specific part of the flow I want to perform an action.
I tried to use shape-controls for those parts but then I have to use a lot of those and its slows down the scrolling. If I create the total pixerboxes in front it results in a "Can't create autoredraw object".
I also tried to create a collection width pixel-coordinates behind the parts, but then I'm getting a very big collection ( like 4.000.000) and that will use much memory.
So you could compare it like kind a flow-drawing application ( a picturebox width a lot of context sentive parts)

does anybody know whats the best way to solve this?

thanks very much.
Martin

Copyright 2005-08 www.BigResource.com, All rights reserved