The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [image]

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

Filter by
Sorted by
Tagged with
7
votes
1answer
350 views

Python Steganographer using PIL

I've made a Python Steganographer using the Python Imaging Library. It basically encodes the binary text in the last 'n' bits of the red content in each pixel of the image. Here is my code, please ...
6
votes
0answers
2k views

Iterate through all the photo library in iOS

This function is supposed to return a map of all unique local identifiers of images that are on the iPhone using the IOS Photos Framework. (it is a map so nSnull or (any object can be mapped to it) ...
6
votes
1answer
497 views

Image creation for every possible color

I'm trying to create an image with every possible color. It would start with a seed pixel and then place randomly-generated RGB pixels around it. Future placements would be based on whichever open ...
8
votes
1answer
249 views

Kernel Convolution in Python 2.7

The code I wrote performs a mean blur on an image (I hardcoded it as zebra.jpg for testing purposes). My problem is that for an image of 39KB image it take minutes to perform, is there any way of ...
6
votes
1answer
374 views

Python image art project

This program takes in an image, and saves an "arrowed" version of that image to /tmp/image.png. Example input and output is below the code. ...
6
votes
2answers
3k views

Java function to rotate an image by 180 degrees

I want to 180 rotate an Image. Here's what I wrote but it seems way too complicated. Is there any way to do this in a simpler way? ...
2
votes
1answer
57 views

Load/save plain PPMs without error checking

I'm learning Lua. I decided to make a simple plain PPM decoder/encoder without error checks to familiarize myself with the language. I would appreciate any feedback on how could I make the following ...
-1
votes
1answer
749 views

Steganography on PPM images

I have recently finished a project on stenography on P3 images and just wanted some advice if there was any improvements I could make on my code. I am new to C so not sure if what I am doing is the ...
2
votes
0answers
133 views

Send image between apps

I have an ASP.NET CORE API app and now I have an endpoint like: ...
4
votes
1answer
93 views

Nearest Neighbor Classifier for CIFAR-10 in Haskell

To get myself into functional programming, I implemented a simple nearest neighbor classifier using Haskell. The code works but is incredibly slow. Profiling tells me that most of the time is spent ...
1
vote
0answers
151 views

Image color reduction

Just for the fun of it, I was looking of ways to make true-color GIFs. I've started to write the code, and it clicked me: this won't work for that, but it does make a nice color-reduction method. ...
5
votes
2answers
2k 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. ...
5
votes
1answer
1k views

User Avatar upload

I have been looking at some coding videos on Laracasts and the focus seems to be very readable code and keeping the controller clean. How can I clean this up? This code takes an uploaded user avatar, ...
3
votes
0answers
1k 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 ...
1
vote
1answer
419 views

Drawing pixel to pixel

I'm drawing a pixel by pixel image with the following code: ...
6
votes
2answers
189 views

Denoise an image under extreme time pressure

I'm working on a real-time, embedded system image processing application for my group engineering capstone in undergrad. I'm receiving data at 60FPS, and have to isolate and detect the location of a ...
3
votes
0answers
61 views

Remove pre-loader animations when all assets on page become available

This code starts when the page loads and when all assets become available, it removes pre-loader animation and page becomes visible. I know some functions has code repetition, but it can await ...
10
votes
2answers
971 views

Mandelbrot Fractal Drawer in C++

As an exercise to learn how OpenGL and image creation worked, as well as to satisfy a curiosity I've developed for Chaos Theory, I decided to create a mandelbrot fractal drawer in C++, which can ...
3
votes
0answers
2k views

Optimization of YUV422 to RGB

I have a stream of YUV422 encoded images coming in from a camera using Direct Show. I then run this byte array through a conversion method and return the RGB array to C# to display in a WPF app. My ...
1
vote
2answers
256 views

Efficient image generation with nodejs

I have an app written with node.js, I have a function which takes an image file name and generates a few variations of this image, code below. The issue I am having is that when I have to generate ...
3
votes
1answer
428 views

C++ rudimentary bitmap image edge detection

What my code does is it reads a 24 bit bitmap image in color, runs a very simple edge detection algorithm and outputs a monochrome 1 bit bitmap with the edges in white. Here is an example of the ...
3
votes
0answers
44 views

Image placement & animation from grid

I have a grid of different sized images. I made a click event function that grabs the image inside any clicked grid-item. It then saves the coordinates and size of the image and animates from the grid ...
8
votes
1answer
448 views

Adding filters to images

Here is some code I wrote as part of a project that I am working on to learn C#. It is a class responsible for applying filters to images. In this case, my code offers filters such as sepia and ...
8
votes
1answer
214 views

Convert an image into characters and colors for the windows console

I've written a function to convert an image into characters and colors for the windows console. At the moment the calculation takes about 13 seconds with a 700x700 pixel image but that time is ...
4
votes
2answers
2k views

Saving image data

Given a heap of pixel data, and a width and height associated with that pixel data, I've written code which will save that data as an image, and it more-or-less works as expected. ...
2
votes
1answer
257 views

Batch convert images to PDF

I wrote a simple program that converts graphic files in a folder to a single PDF using Magic.NET. It works fine. I'm interested in general comments about the code ...
5
votes
1answer
730 views

Pin an array in memory and construct a Bitmap using that buffer

I'm using some resources in the code below to pin an array in memory and construct a Bitmap using that buffer. I'm not sure if I'm handling all of the resourced in ...
4
votes
1answer
80 views

C program that recovers lost JPEG files

My overall strategy is to load a block size (512bytes) into memory and check if that blocks first 4 bytes match a JPEGS first 4 bytes. If it does then, I'll open a new out file and start writing the ...
3
votes
4answers
111 views

Comparison methods for Photo objects

I'm unsure of how to Name and clearly distinguish between methods that deals with comparisons. I know of the following two established concepts: .Equals: A ...
1
vote
1answer
570 views

Texture loading in LWJGL 3

I made the following class to simpify texture loading in LWJGL 3, and modeled it after the slick-util API: ...
7
votes
1answer
3k views

Finding rectangles in an image

So my this class is one in which is used to find rectangles in images that have already been pre-processed. For example the images are to be deskewed, greyscale etc. Following feedback off of various ...
9
votes
1answer
2k views

Efficient extraction of patch features over an image

Input: data - a matrix of size n*m*3*3 (complex values) indices - a list of coordinates (x,y), where x < n and y < m fp - a feature parameter which is a tuple of ((fp11, fp12), (fp21, fp22)), ...
7
votes
2answers
128 views

Comparing image resolutions to ratios

I made this Python 3.6 program that generates a list of images that fail to compare against a given ratio. Each image has a resolution and with a bit of math, the program is supposed to calculate the ...
4
votes
1answer
1k views

Pizza ordering program recursion on the GUI

This program is a basic pizza ordering program with seven topping options, four size options, and five crust options. It pulls the options from a database and populates the GUI on start. I connected ...
2
votes
1answer
99 views

Incrementing colors

I just started messing around with Java's BufferedImage. I had an idea to try to encode a message into a picture by coloring each pixel a certain color that ...
2
votes
0answers
97 views

Parallelized image transformations using GraphicsMagick

This is part of a script that I use for porting a TWRP theme from one resolution to another, respectively portrait to portrait and landscape to landscape. In this function entirely, it focuses on the ...
3
votes
2answers
94 views

Minecraft server querier that generates an image of online players

This little chunk of code is run every 10 seconds on my desktop. It generates a PNG with up to 6 player faces based on the list of online players. Is there any way for this code to execute faster? ...
2
votes
1answer
3k views

Polynomial curve-fitting over a large 3D data set

I have a list of 4 images, called listfile.list, which looks like this: image1 image2 image3 image4 Each image has 10 frames containing a 2000 x 2000 array of ...
12
votes
5answers
8k views

Image resizing class

How does this class to resize an image look? ...
6
votes
3answers
3k views

Colored image will become black and white

For a project of mine, which is targeting java 6, I had been in the need to have different algorithms/methods to change a BufferdImage with a ...
2
votes
1answer
3k views

JPG image resizing

This Delphi (Seattle 10) routine resizes a JPG image if one of its sizes is larger than AMaxDimension pixels, and gives it a compression factor of ...
1
vote
1answer
487 views

“Images” exercise from A Tour of Go

The "Images" exercise in A Tour of Go asks for an implementation of image.Image. I wrote two solutions, one easy and one harder (just for practice in dealing with ...
2
votes
1answer
394 views

Responsive image slider

I have been doing some Code School classes on jQuery, and I needed a image slider for my site. Right now, there are only two responsive states, but that will most likely change (and/or become fluid ...
1
vote
3answers
154 views

Mini image gallery

I have made a mini image gallery which consists of one large div which has a background image of one of the galleries images. Underneath that are five thumbnail images, that when clicked, change the ...
4
votes
1answer
386 views

Python script to store nd array into images

I am trying to write a generic Python script that do the following types of tasks: Load .npy file (the .npy file is of shape (m_samples, channels, row, column), which corresponds to ...
1
vote
2answers
55 views

Code that rotates images in a set of divs

I am rotating images inside some divs. An image is associated with a link.Eg: image0 is associated with link0, image1 with link1 and so on. image0 and link0 should display in pos-1 image1/link1 ...
5
votes
2answers
1k views

Classifying image by file extension within a PDF creator

To create a pdfDocument I am using following code which works as expected but do not want to use multiple if else. Any patterns or any design strategies? It may ...
1
vote
0answers
191 views

Unit test for my image resizer class

I made a class that will be used to get an image properties like width, height, and MIME type. ...
2
votes
0answers
177 views

SVG filtering an image to stepped alpha grayscale

I have a variety of images that will be used in a style intended to mimic a dot-matrix LCD. In a previous version, I rendered these images using a program and essentially ended up with a duplicate of ...