image

Serializing a WPF Image

I'm trying to understand how image serialization works in WPF. I have the following class: [Serializable] public class TestClass : ISerializable { public TestClass() { } protected TestClass(SerializationInfo info, StreamingContext context) { SerializedImage = (byte[])info.GetValue("SerializedImage", typeof(byte[]))...

c# Bitmap.Save transparancy doesn't save in png

I'm trying to save a Bitmap class that has transparancy as a png file with transparancy. I'm having no luck. The bitmap has transparancy, it just doesn't save with transparancy. this is what I'm doing bitmap setup Bitmap ret = new Bitmap(bWidth, bHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb); saveing ret.Save(filenam...

Get image mimetype from resource in PHP/GD?

I'm trying to find the mime type of an image. PHP has the function getimagesize but that only takes a filename, whereas I have an image "resource" instead - i.e. an image created from imagecreatefromstring. I found the functions imagesx and imagesy which return the width/height from a resource but I can't find any function that tell me ...

How can I get the resolution of an image? (JPEG, GIF, PNG, JPG)

I found this method: Graphics g = e.Graphics; Bitmap bmp = new Bitmap("winter.jpg"); g.DrawImage(bmp, 0, 0); Console.WriteLine("Screen resolution: " + g.DpiX + "DPI"); Console.WriteLine("Image resolution: " + bmp.HorizontalResolution + "DPI"); Console.WriteLine("Image Width: " + bmp.Width); Console.WriteLine("Image Height: " + bmp.Heigh...

How to zoom in and zoom out image using jquery?

Hi Friends! I have following code <div class="c1"> <div class="d1"> <img /> <img /> <img /> </div> </div> 1.There are GIF images included in tag. These images are transparent and some portion of them are highlighted with transparent yellow patch. 2. css class is applied to inner div class and the...

Convert GD image back to binary data

I have a GD image resource created from imagecreatefromstring. After some image operations, I want to convert it back to binary data. How would I do this? Can't see any functions in the manual... ...

Getting an 'out of memory' exception in this relatively simple program.

Here's my Picture.cs class: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Drawing; namespace SharpLibrary_MediaManager { public class Picture:BaseFile { public int Height { get; set; } public int Width { get; set; } public Image Thumbn...

Word VBA checkboxes with link to image that needs to be built up

Hi, I am having problems with a table containing checkboxes in Word. I am working with a table containing 10 checkboxes. Next to this table, there is an image. When the user checks one of the checkboxes, something has to be added to the image, i.e. the image is further completed. However, the order of checking the checkboxes is not fix...

how do i change an image on a button in another view

how do i change the image that is displayed for a button when the button is in another view. ...

HTML CSS Making the background image stagnant

I'd like to make it so the background image stays stagnant/put while the website scrolls up and down. How do I go about doing this? ...

What good open source programs exist for fuzzing popular image file types?

I am looking for a free, open source, portable fuzzing tool for popular image file types that is written in either Java, Python, or Jython. Ideally, it would accept specifications for the fuzzable fields using some kind of declarative constraints. Non-procedural grammar for specifying constraints are greatly preferred. Otherwise, might...

Image manipulation with javascript

I need the best way to manipulate with image in web browser with javascript. How create script which will change brightness or contrast. I google a little but i can find any acceptable solution. ...

Smooth transition from image to image

Here is my XAML: <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Image x:Name="Expander_Normal" Source="/Images/arrow-e.tiff" Width="13" Height="13" /> <ControlTemplate.Triggers> <Trigger Property="ToggleButton.IsChecked" Value="True"> <Setter x:Name="Expander_Expanded" ...

How to overlay two images (as byte arrays)

People, i'm sure that it's quite easy, but google didn't helped... Here is the task - i have two byte arrays (as ARGB), representing my images. They have the same size. What operation i should perform (byte by byte) to overlay one image to another? Second image has some transparency, which must be considered. To clear, im looking for a...

CSS: Background Issues. Is this possible?

Thanks for your help in advance. Here is PNG of the layout: Website Layout The Second Section (with the dark grey background) is giving me problems. Below is the CSS I am using for the background. #mainbg { width:100%; height:450px; padding-top:25px; background-image:url(../images/mainbg.png); background-color:#303030; background-posi...

How to dump out an array of pixels as a png ?

I'm on MacOSX. I have read out an image, as char image[WIDTH][HEIGHT][3]; // row, col, rgb value Now, I want to dump it out as a png file. What is the quickest way to do this? ...

How to update a div with an image in Django?

The following is a matplotlib code that generates a scatter plot in as the response. def plot(request): r = mlab.csv2rec('data.csv') fig = Figure(figsize=(6,6)) canvas = FigureCanvas(fig) ax = fig.add_subplot(111) ax.grid(True,linestyle='-',color='gray') ax.scatter(r.x,r.y); response=django.h...

Resize an Image file?

I'm writing an iPhone app. I want a UIImagePicker control to come up when the app is launched. When the user selects an image, I want to resize that to being 512x512 with the original image just in the top-left. I then want to save it to a new file in my app's folder. How do I achieve this? ...

Rackspace cloud files: Image Upload to rackspace cloud files using PHP

I am doing a project where user can upload images like profile image or image for their image gallary. right now its uploading all the images to my server. Now, i want to upload all this image to my rackspace cloud files directly using php script. For example: user select a file press submit with some information the selected file w...

How do you perform an animated rotate of an image in WPF?

I am just starting out using WPF. I want to rotate an image when i click a button but I don't want the image to rotate in one instant rotation. I want the use to see the image rotate one degree at a time. What is the easiest way to do this in C#? ...