This tag is for questions related to the loading, formatting, saving, compression, and display of data representing pictures.

learn more… | top users | synonyms

2
votes
0answers
19 views

Simple gallery with scroll

I just created a simple gallery with scroll. Everything works fine but I'm not sure how should I optimize this code: ...
1
vote
0answers
20 views

MPI BMP image comparison

I made a simple program in which I compare two images pixel by pixel and determine if the pictures are the same. I'm trying to adapt it to MPI, but I'm afraid that the communications are taking too ...
2
votes
2answers
44 views

Importing JPG, JPEG, and PNG images from a folder to an Excel worksheet

As I am a novice, I was keen to solve the task, so now I want to optimize the code. ...
2
votes
1answer
71 views

Upload image with secure code

I have written [PHP code][ to upload image/s to server. (To see the result, open the JavaScript console of your browser, look at the Network tab or the Console tab.) The code is also available and ...
1
vote
0answers
62 views

Unwrapping multiple inner loops in CUDA for 4D nonlocal filter

I'm working on some sort of non-local means filtering in 4D space (x,y,z + time). The idea is to pass to GPU a chunk of large 4D array in order to process it and return a filtered 3D slice (then ...
-1
votes
0answers
16 views

Android API code block to upload image [on hold]

someone made me an API function to upload an image to a server through Android and I would like to know if it looks good enough or if it would work. ...
3
votes
0answers
26 views

IsImageUrl extension method written in F#

I'm a newbie to F# and so I've written a small extension method library to practice the language. The extension method attempts to determine if a url string is for an image. I wrote the code as an ...
14
votes
1answer
129 views

Dynamic Colour Binning: Grouping Similar Colours in Images

This is a piece of code that implements an image-processing algorithm I came up with. I call it Dynamic Colour Binning. It's a fairly academic exercise that was more about providing a learning ...
3
votes
1answer
36 views

Converting images to greyscale using JuicyPixel

I would like to use Haskell to do some image processing so I have been writing small programs to test performance. I wrote a program to batch convert PNG images from color to greyscale. I compared the ...
2
votes
0answers
43 views

Serving images from a Raspberry Pi camera over HTTP

I have a Pi with a camera module that I control with python. I created a web server with web.py that allows me to make HTTP requests to the PI to retrieve an image. There are two optional parameters ...
2
votes
1answer
47 views

Expanding pixels in an image

Custom class Image takes a 2-D array of 0's and 1's upon initialization. Method transform returns a modified array by modifying 0's adjacent to a 1, such that ...
1
vote
2answers
91 views

Faster copying of images to change their PixelFormat

I have the following code below that creates a new Bitmap object the same as the original but to ensure that its PixelFormat is ...
5
votes
1answer
73 views

Computing the total different between a pixel and its neighborhood

I have C++ code which written for mex in MATLAB. It used to compute the total different between a pixel and its neighborhood (8 neighborhood in my code). The code ran and gave me an expected result. ...
4
votes
1answer
25 views

Extract PNGs embedded in a file

My approach was to find each occurrence of the PNG's file signature followed by its end of file (EOF) and write the bytes between to a new file whose name is simply a counter starting at zero. ...
1
vote
0answers
50 views

Inpainting algorithm using conjugate gradient for colored images using Matlab

I am currently working on an inpainting algorithm : the input is a picture, I apply a Mask (random disposition of dark pixels) and then the algorithm tries to recover the original picture using the ...
2
votes
2answers
124 views

png2jpeg, a utility for converting PNG to JPEG (rev. 2/3)

Revisions: Revision 1 Revision 2 (you are here) Revision 3 png2jpeg is a simple command-line converter of PNG to JPEG. The source code requires the libpng and libjpeg development libraries to be ...
1
vote
0answers
51 views

object.Body.js - module for changing background image

I use and ID instead of the body directly so I can easily modify this for other elements. I'm looking for general feedback and am interested more on code structure than things like naming ...
3
votes
1answer
35 views

Vertical cycle slideshow

I want to make a vertical cycle slideshow. This works perfectly for me but I'm just wondering if it's possible to achieve the same functioning with a better code. I don't know if my code would provoke ...
7
votes
2answers
225 views

png2jpeg, a utility for converting PNG to JPEG (rev. 1/3)

Revisions: Revision 1 (you are here) Revision 2 Revision 3 I've been working on a simple command-line png2jpeg utility. Its purpose is to convert images from PNG format to JPEG. The source code ...
4
votes
1answer
43 views

Conway's Game of Life in Python, saving to an image

I have attempted to make conways game of life in Python, and then save the output into a picture. Is there any way to make this more efficient? Is there anything wrong with the logic? (Most of the ...
4
votes
1answer
561 views

Get image from other site in PHP

I would like to get images from other websites. This is my current method but I'm not sure if it is alright. ...
6
votes
1answer
84 views

Eraser tool for GIF editor

I am making a GIF editor in C#, and I am currently working on the eraser tool. I am not sure what I can do to make it more efficient, because when I make the thickness (diameter) more than 30 (pixels) ...
1
vote
1answer
44 views

Setting and showing an image file on a QGraphicsView

This code sets and shows an image file on a QGraphicsView. I'm interested in seeing how to improve readability and reduce redundancy. ...
0
votes
0answers
37 views

Responsive photo gallery using Flickr API

This began as just a simple sidebar widget and evolved into what you see here. I'm pretty happy with the results but the photos take a long time to render and sort out on the page. Is this mostly ...
1
vote
0answers
68 views

Resize image from StorageFile

I have created a function that will take as a parameter a StorageFile and return a WriteableBitmap. I use this data type so that ...
3
votes
2answers
166 views

Heightmap generation using midpoint displacement

I am writing a program to generate a height map following the midpoint displacement algorithm (somewhat similar to diamond-square). I'm at the point where I have a recursive program that paints the ...
8
votes
0answers
230 views

Decompose polarimetric SAR covariance matrices in MATLAB

I want to apply the following code on 3 images of the sizes 676×718, 1430×1440, and 5576×9444, but the code is too slow even for the 676×718 image. ...
2
votes
1answer
63 views

PHP page to edit a user account information and avatar

I wanted to ask your opinion about my code created for acccount.php page for editing the data of each logged-in user. I wanted to have more of an opinion on your right syntax, though maybe it could ...
3
votes
1answer
106 views

Clickable and automatic image slider

I created a slider that fades images automatically but you can also click to see the next or previous image. It already works how it should. But I think my code is really heavy. I am not experienced ...
4
votes
1answer
25 views

Making time lapse screenshots using Bash

My experience in bash is... well, around the Bourne shell on AIX. I wrote a semi-complex script in Bash, and I feel that it could be improved in 100 different ways. The Github project is here: ...
3
votes
0answers
55 views

Segmenting brain images (Dicom format) using region-growing algorithm

I have a list of images in a folder where num denotes the index of image and I used num to run the iterations in a "for loop". ...
1
vote
2answers
41 views

Scaling and cropping an image adaptively based on the window dimensions [closed]

I've tried my best (I'm new to JS) to write a script that make an image fit to its parent div with respect of the ratio and overflowing when needed. For example, if the ...
4
votes
1answer
73 views

Efficient image padding in C

I am currently implementing pyramids in Lucas Kanade algorithm for optical flow. To be able to build pyramids, I need to pad the images (mirror edge matrix elements) for the required amount of ...
0
votes
0answers
19 views

Sporadic div positioning using Isotrope

I am currently using jQuery + "isotrope" to make an image gallery where images can be filtered using "data-filters". But "Isotope" uses grids to organise the divs but I would like something like the ...
3
votes
2answers
65 views

BMP file writer

In my current project I'm writing a C function to write a BMP-File. Internally, the function is split up into three parts: write header, write info header, write data. In some of these functions I do ...
7
votes
1answer
114 views

Doge meme generator in Racket

I wrote a doge meme generator in racket some time ago, mainly as a joke, and I would like some criticism about the general style and what could be improved. Here is how the program output looks : ...
0
votes
2answers
42 views

BMP writer in C

I recently wrote a BMP writer in C: bmpWriter.h ...
1
vote
0answers
283 views

Image gallery with pagination using CSS, $_GET, and Bootstrap

I am relatively new to web development and I created an image gallery with pagination using the Twitter Bootstrap framework. Basically, I want to know if I approached creating an image gallery ...
2
votes
0answers
43 views

Transform and transpose byte[] of 32bit image data in 24bit array image data

I would like to know if someone can think about a better solution for doing this stuff. I have an array of raw bitmap data in 32bit format (RGBA). I need to transform and transpose this array into a ...
0
votes
0answers
49 views

Computing the curvature of a 2D image

I have some MATLAB code that computes the curvature of a 2d image. It computes it iteratively using forward and backward differences. Could you offer some tips for how I can optimize this code? ...
3
votes
2answers
134 views

Pixelating black and white images

I am doing a function that pixelates black and white images. The function must be called pixelate(img, (pixel_width, pixel_height), mode). The parameter ...
2
votes
1answer
53 views

Loading images in the background for a table view

I have fetchData method which fills my imagesArray: ...
3
votes
1answer
56 views

Mouseover effects for social network icons

Hey so I have written some code out in jQuery, but it seems to violate DRY. I'm not too familiar with JavaScript or jQuery, so I was just asking for some advice on how to optimize this code: ...
4
votes
1answer
67 views

Converting image size from Maybe (Int, Int) to (Float, Float)

I have a function that returns size of an image IO (Maybe (Int, Int)) It would be nice to convert it to float tuple beautifully. I am sure there must be a better ...
1
vote
1answer
63 views

Converting url data to base 64

I've a piece of code down below that I'm really unsure about. Basically an user can type the url (urlStr param of the method) he wants. From this url I need to : get the data as Base64 so I can ...
2
votes
1answer
165 views

Image Scrolling in UITableView with Parse

I'm trying to create an app that is scalable. One of the main features of the app is to view images from a database to a UITableView. Here is my code: ...
3
votes
0answers
347 views

Caching image in memory or on disk

I am caching an image locally..That same image will be used in few screens. Steps for doing this is as follows: Get image from cache If not present in NSCache, get image from Cache directory If not ...
4
votes
1answer
56 views

Caching mechanism for saving a bitmap

I needed a quick caching mechanism to save a bitmap (picture). There was no way I could get the bitmap to the class where I need to upload it to the server so for the sake of organization and code ...
10
votes
1answer
135 views

Fast way to find the most similar color in an array

I have an image and a palette that I want to apply on that image, that is, change all colors of the image to match the closest they can find on the palette. While I have multiple ways to do it, I want ...
8
votes
1answer
48 views

Image labeling: it's Monday again

This command line program applies defined labels along with Monday's date to a directory of images. The script has to handle not being run on a Monday. Others are asking for the script so I cleaned ...