image

Writing text with carriage return to image in Python using PIL

Hello, I have a python script that is writing text to images using the PIL. Everything this is working fine except for when I encounter strings with carriage returns in them. I need to preserve the carriage returns in the text. Instead of writing the carriage return to the image, I get a little box character where the return should be. ...

How can I associate images with entities in Google App Engine

I'm working on a Google App Engine application, and have come to the point where I want to associate images on the filesystem to entities in the database. I'm using the bulkupload_client.py script to upload entities to the database, but am stuck trying to figure out how to associate filesystem files to the entities. If an entity has th...

Why does resizing a png image lose transparency?

I am trying to resize an image as follows. I return the resized image into byte[] so that I can store it in database. The transparency of png image is lost. Please help to make this better. private byte[] GetThumbNail(string imageFile, Stream imageStream, int imageLen) { try { Image.GetThumbnailImageAbort imageCallBack = ...

Creating a PHP Webservice with binary-encoded parameters?

Hi, I'm trying to build a PHP webservice for an iPhone project I'm developing. I need to be able to send an image (picture) to the webservice, where I'll then store this in a database. I also need to write a service that will, of course, return this data when requested. I'm not sure where to start though. I've 'googled' for how I can b...

WPF Image Source Binding

I have a ListBox with ItemTemplates and some data bindings, including an Image The ItemsSource is set in the codebehind. Everything works as expected until the app tries to change the image's source by updating the object's member, which is bound to the image source. What am I doing wrong? Here's the XAML: <ListBox x:Name="myList" Mou...

To send an image every 50 ms., should I use TCP or UDP?

I am building a C# application, using the server-client model, where the server is sending an image (100kb) to the client through a socket every 50ms... I was using TCP, but besides the overhead of this protocol, sometimes the client ended up with more than one image on the socket. And I still haven't though of a clever mechanism to sp...

PHP - Store Images in SESSION data ???

Can you store an image in a PHP SESSION ? I have a multi-step registration process using PHP on my site. On one of the steps, the users can upload their company logo (image). The last step is to process their credit card. So before I write any images to the web server and image location to the database, I want to make sure their cred...

WPF Listbox Image binding question (again)!

This is killing me, I can't get an image to display as a list box item: here is my code: WPF: // listbox called lstWidgets <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Name="txtTitle" Margin="2,5,5,2" Text="{Binding name}" /> <Image Name="imgDisp" Source="{Binding img}" Width="50" Height="50"/> ...

What's the best way of displaying thumbnails in ASP.NET?

I'm creating a regular gallery in ASP.NET but I have little experiences with creation of thumbnails. I know the algorithms and the GetThumbnailImage method, but my problem is somewhere else - I'm currently displaying the images (just resized) using the ImageButton control. And that's the point - I have no idea how to hook up the "thumbna...

How to preserve aspect ratio when scaling image using one (CSS) dimension in IE6?

Here's the problem. I have an image: <img alt="alttext" src="filename.jpg"/> Note no height or width specified. On certain pages I want to only show a thumbnail. I can't alter the html, so I use the following CSS: .blog_list div.postbody img { width:75px; } Which (in most browsers) makes a page of uniformly wide thumbnails, all wi...

How can I upload/resize images taken with a digital camera?

I am working on a building a gallery and the goal is a low barrier of entry. My user is someone who takes pictures using their digital camera so file size would be between 200 - 400 KB per image. The problem I am running into using the GD library is that each image when resized and uploaded use about 90MB of memory+ when the server h...

How can I remove a temporary file (image) that is being displayed by CGI?

I've written a python CGI script that converts files into .jpgs and displays them in a simple HTML page. I don't want to clutter up the folders with these .jpg files, so I used tempfile.NamedTemporaryFile to create a file to store the converted .jpg output. Everything works great, but i want to remove this file after the page is displa...

What are the best ways to convert MS word file to image or pdf preferably using java?

I want to convert MS word formatted documents to images and pdf. I am well versed with Java. I was looking for apis using which I can do the same. Can anyone please point me to that ? If you know the best alternatives even though they are for other languages , please update me about that. ...

POI 3.2 Image Height/Width controlling

Using POI version 3.2 Issue: Not able to resize an image to its original height and width. I am able to add an image to the excel file. After adding image I call picture.resize(); method. Later I resize the columns of the excel file by calling sheet.setColumnWidth(columnindex, columnwidth) the image losses its original height/width. ...

problem with MATLAB imread()

In my previous question I asked about Blind Deconvolution in Matlab. Now I have a new problem where I know how imread and imwrite works but I don't know where do the function call the image file from? in other words where do I store the image in order to call it using imread? ...

How do you store an app engine Image object in the db???

I'm a bit stuck with my code: def setVenueImage(img): img = images.Image(img.read()) x, y = photo_utils.getIdealResolution(img.width, img.height) img.resize(x, y) img.execute_transforms() venue_obj = getVenueSingletonObject() if venue_obj is None: venue_obj = Venue(images = [img]) else: venue_obj.images.append(...

VB.NET Image array using project resources

I need to make an array of images using references to the resources folder. The following is my code which does not work: Dim imgPictures(8) As Image imgPictures(0) = Image.FromFile(My.Resources.cat_1.ToString) How do I reference the images sitting in the resouces folder for this task? Cheers ...

Problem with Array type "DAMPAR" in MATLAB deconvolucy.m

Below is part of the code that i tried to edit from, MATLAB's deconvolucy. it appears to have problem with DAMPAR where the class type does not match. can anyone help or does anyone know a better way to call in an image that I (as in deconvolucy.m) would tolerate? [perhaps i should convert the image into array before use? how do i do ...

How do I insert an image name into a database?

I succeed to upload and image and resize it. Now I want to insert my image's name into the database. I'm using SQL Server. The table is named images and has two columns, an integer imageid and imagename as string(invarchar(max)). I need the file name saved in the imagename column and imageid must be an identity. Here's the code I have ...

Making this code for image resize() work

My instructor sent me this code, which is supposed to be an integral part of an ongoing project. Thing is, it doesn't work. import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.awt.*; import java.awt.image.BufferedImage; import java.awt.image.Kernel; import java.awt.image.ConvolveOp; import com.s...