Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Get image dimensions from image datatype field

Author  Topic 

steph03
Starting Member

1 Post

Posted - 2009-04-09 : 11:55:04

Hi all,
I was wondering if there was a way to get the image dimensions (W x H) of an image stored in an image datatype field.
If it helps, I am using VB6 to pull the images to.

Thank you,
Stephane

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-04-19 : 10:34:43
You can use SUBSTRING. Image properties are most often stored in the beginning of image data.
See example here for BMP images
http://en.wikipedia.org/wiki/BMP_file_format



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-04-19 : 11:00:47
[code]
SELECT SUBSTRING(Col1, 18, 4) AS Width,
SUBSTRING(Col1, 22, 4) AS Height
FROM Table1
WHERE Col1 LIKE 'BM%'[/code]


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -