image

display/retrieve image from sql database in vb.net

should be pretty simple for a pro. i have images in sql server database and i want to retrieve them in my aspx (vb.net) file. i have in aspx this image control - in vb.net i have started this code - Private Sub ImageDisplay() Dim SqlCnn As SqlConnection = Nothing, sql As String = "" ConnectDB(SqlCnn) Try sql = "SELE...

java UnsatisfiedLinkError awt.image

I have a program that makes use of the following method to get a scaled instance of an image icon: public ImageIcon createScaledImageIcon(String filename) { ImageIcon icon = new ImageIcon(filename); Image image = icon.getImage().getScaledInstance(cardWidth, cardHeight, Image.SCALE_SMOOTH); icon.setImage(image); return ic...

Should image size be defined in the img tag height/width attributes or in CSS?

Is it better coding practice to define an images size in the img tag's width and height attributes? <img src="images/academia_vs_business.png" width="740" height="382" alt="" /> Or in the CSS style with width/height? <img src="images/academia_vs_business.png" style="width:740px; height:382px;" alt="" /> Or both? <img src="images/a...

Oracle SQL-Developer: Export "Explain Plan" Images?

I'm trying to export a copy of the Explain Plan from Oracle SQL Developer 2.1.0.63 All I get out is a html file named what I specify, then a newly created folder in the same directory called "images", which is empty. I've taken a squizz at the (cough)tabular(cough) HTML output, found there's half a dozen images specified, but I think t...

How do I bind an Image dynamically in XAML?

The following displays an image correctly in a silverlight usercontrol: Image image = pagingManager.BaseApp.DatasourceManager.GetImage("helloWorld1"); ContentArea.Content = image; ... <ContentControl x:Name="ContentArea"/> However, I want to dynamically bind the image to XAML, e.g. like this: #region ViewModelProperty: MainImage priv...

Aligning an image to the right side of a div

Using JQuery JEditable, I have the following code below which allows the user to create virtual post-it notes, so to speak, and I'm trying to make it so that beside each div created, a delete image that the user can simply click on. I feel that I'm almost there, I'm just missing something. As of right now the image appears only on the ri...

Calculating pixel length of an image

Hello, May I know what are the ways to calculate the length of 1 pixel in centimeters? The images that I have are 640x480. I would like to compare 2 pixels at different places on the image and find the difference in distance. Thus I would need to find out what's the length of the pixel in centimeters. Thank you. ...

Subsonic SimpleRepository upload image

Hi There I have been using SimpleRepository for months now, and for the first time i have to upload and store an Image/Document in the database My Class looks as follow: public class Document: ObjectMetaData { public string FileName { get; set; } public Guid UserId { get; set; } public DocumentType DocumentType { get; set;...

Multiple storage of images and BLOB files in SQL Server

I have a question about this query on inserting. INSERT INTO BLOBTest (BLOBName, BLOBData) SELECT 'First test file', BulkColumn FROM OPENROWSET( Bulk 'C:\temp\nextup.jpg', SINGLE_BLOB) AS BLOB It works great, but my question is how do I insert more than one image at a time? I have a directory that has 1000+ images I need to i...

Is it possible to make a grayscale BMP file?

Hello. I am trying to make a program that outputs a 8-bit grayscale image to bmp file. I have found out that 8-bit BMP files are indexed. Is it possible to omit the color table and just put values instead of indexes in the color table? Or BMP format does not allow this? ...

C# - How to change PNG quality or color depth.

I am supposed to write a program that gets some PNG images from the user, does some simple edits like rotation and saves them inside a JAR file so that it can use the images as resources. The problem is when I open, say an 80kb image and then save it with C#, I get an image with the same quality but for 130kb space. And because it has to...

Read pixel data from an image file in .NET

I am trying to read in the pixel data from an image file as a byte[], for in-memory storage. (The byte array will later be fed to a bitmap image object, but I want the data in memory so that there's no I/O holdup.) This is what I'm currently doing: private byte[] GetImageBytes(Uri imageUri) { //arraySize and stride previously de...

Why does the Image element give me a design-time error with "add as link"ed images?

I need to display an image, which I've done without problems before, but today I decided to be tricky and use "add as link" instead. Well, now I get: The file Images/hello.png is not part of the project or its 'Build Action' property is not set to 'Resource'. Wait... its Build Action is set to Resource. I've seen a Silverlight soluti...

Javascript Browser Issue

I'm new to javascript, my script is designed to display either one image or the other image with a 50/50 chance. It worked in safari but not in firefox, this cuts out too many customers for the website I'm designing for. Any help would be appreciated, especially if anyone could say how to make sure it would work across all browsers. Oth...

Distortion when resizing/scaling WPF Image

I have a program that displays an image, and the user can resize the image in the window (e.g. by rolling the mouse wheel). I scale the image using a RenderTransform, like this: <Image x:Name="CurrentImage"> <Image.RenderTransform> <TransformGroup> <TranslateTransform x:Name="Translate" X="0" Y="0"/> ...

When dealing with GD Library unwantedly altering colors

I'm merging multiple small images into a rectangular mosaic.. When dealing with a small number of source images it turns out fine: grab.by/2Y4W (sorry, I'm new and am not allowed to post multiple hyperlinks) But when dealing with a larger number of sources it turns out a sepia like effect: http://grab.by/2Y4P Is there any technique I ...

Javascript image load: get error status

Hi, I am loading a image trough javascript: myimage.src = "/mycontroller/mymethod"; myimage.alt = "image"; myimage.onload = function(){ $('body').append(myimage); }; But, somethimes my controller method should return an error, with the http status 500. So, the content-type will not be "image/png" anymore. Will be text. There's...

Operand type clash: nvarchar is incompatible with image

I'm using a SQL Server 2008 stored procedure to create a new record with this syntax: cmd.Parameters.Add("@photo", DBNull.Value) cmd.ExecuteNonQuery() but the result is a: Operand type clash: nvarchar is incompatible with image Photo is not the only parameter but is the only image one, I am not passing a nvarchar but a null v...

save png image with custom quality or color depth in C#

I wanted to know how could I change the quality or color depth of an image and save it in PNG. The encoder method seems to work only for jpegs. Thanks in advance. ...

creating table at runtime in vb.net, image control doesnt have imageurl proerty

i am creating a table in vb.net code (htmltable) with htmltablerows and htmltablecell. I gave on image control but thatr control cant have the .imageurl property, which i need cause i have a handler image.ashx which brings image from the database. heres' the code - TD = New HtmlTableCell Dim img As New HtmlImage() img.ID = "image_" & rd...