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
1answer
21 views

Image-processing filters using decorator pattern in Java

This is a follow-up question of this other one, where I was trying to use the Decorator Pattern in a Python example. I figured, that Java might be a better language for this exercise, so I ported my ...
5
votes
2answers
92 views
+50

Accepting user defined functions for custom map reduce functionality in C++

I am implementing map and reduce - style functions for processing geospatial raster datasets. I would like the ...
-1
votes
0answers
22 views

Image input output in Java [closed]

In this code I have taken an image as input and output the same image. As far I know if two images are same then their PSNR value will be inf. So I calculate their PSNR value using MATLAB but it shows ...
0
votes
1answer
37 views

Image-processing filters using decorator pattern in Python 3

The goal of the following short Python 3 program is to improve my understanding of the decorator design pattern. Therefore, I would be mostly interested about feedback on this aspect, i.e. whether ...
3
votes
2answers
42 views

JS cross-fade transition

As the question says....Can this be done any better? I could introduce more variables to cut down on function number, but does it make sense? So this is a simple cross-fade between two images : ...
7
votes
1answer
37 views

Barcode (Code 128)

I wrote the code below to generate Code 128 barcodes, based on the specs. ...
4
votes
2answers
79 views

Search rectangle on bitmap

I have code that loading bitmap from file. And searching for black rectangle(5*5). Can you help me to review it? ...
6
votes
1answer
149 views

Update bitmap in picturebox with data from a socket

I'm working on a screen sharing project, and I receive a small block of images from a Socket constantly. I need to update them on a certain initial desktop bitmap I ...
4
votes
1answer
148 views

SVG photo mosaic creator

I got this as part of some interview assignment. After some head scratching I think I have done quite well as the result can be seen here: After transformation(10x10 tile): More crisp picture ...
5
votes
1answer
55 views

Image Stenography using LSB technique

The program can be used to hide an image within another image and later extract the hidden image. This is done by concealing the secret image within the lowest bits of the apparent image. Example of a ...
4
votes
1answer
67 views

Reading and displaying an image from a folder

I have a question concerning the correctness of the reading and displaying the image in ASP.NET Core MVC web application. This is the way I am reading image names from a specific folder (I am using <...
3
votes
1answer
115 views

PHP Image size recalculation function

I got a function to recalculate the image size based on two settings. Force ratio, force the requested ratio, default the original ratio will be used. Keepsmaller, the uploaded image may never ...
3
votes
1answer
46 views

Writing a byte array image to disk with an automatically generated filename

I have the following code that that writes large images to disk. My application server is running out of memory and I'm wondering if I could somehow optimize the following: ...
7
votes
2answers
181 views

Reading binary files in XTF format

I have a few thousand binary files that have corresponding structs in them, followed by any number of bytes (this exact number of bytes is given in one of the fields in the structs). I read in data ...
3
votes
0answers
33 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: ...
2
votes
0answers
44 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 ...
4
votes
2answers
76 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
83 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
89 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 ...
3
votes
1answer
52 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
151 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
40 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 ...
3
votes
0answers
54 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
50 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
133 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
84 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
26 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
75 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
125 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
55 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 conventions....
3
votes
1answer
38 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
228 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
571 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
93 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
56 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
43 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
1answer
111 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
170 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
258 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
86 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
118 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
27 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: https:/...
6
votes
1answer
75 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
43 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
89 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 rows/...
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
68 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
146 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
49 views

BMP writer in C

I recently wrote a BMP writer in C: bmpWriter.h ...