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
9
votes
2answers
725 views

Decoding grayscale PNG and performing Prewitt operator for edge detection

I'm a hobbyist programmer. What I try to do here is to read 8-bit grayscale PNG file. Then unfilter it. (That caused a headache). And after that perform Prewitt operator for "edge detection". I know ...
15
votes
6answers
14k views

Determine if an image is opaque or transparent

I wrote an extension method defined for the Image Class (System.Drawing) — which returns a Boolean value telling you if the image is opaque or transparent. The color of each pixel in the image is ...
4
votes
2answers
144 views

Detecting a certain amount of violet in an image - follow-up

I'm trying to write a program to detect the colour violet in an image.As discussed in my previous Post @Johnbot suggested that I try using HSL / HSV to determine if the pixel is some shade of violet. ...
15
votes
1answer
11k views

Rotating greyscale images

For educational purposes I wrote a little piece of code to rotate greyscale images as "low level" as possible, that is, not using any rotate() function, but doing ...
14
votes
5answers
1k views

Mandelbrot image generator

I have written a C program to generate a PPM (Portable Pixmap) image of the Mandelbrot set. The program implements many things in C I am fairly unfamiliar with (Structures, error handling, use of new ...
8
votes
3answers
1k views

Detecting a certain amount of violet in an image

I need to be able to detect if an image has the colour Violet in it. (Follow-up) The problem that I'm facing is that there are quite a number of shades of violet that it seems almost impossible it ...
4
votes
0answers
148 views

Super Resolution in the Wolfram Language, Attempt 2

This is a wolfram language program I wrote for super-resolution, in this case meaning to guess at how to increase the the resolution, and so detail shown in a raster image such as a photograph. It ...
3
votes
2answers
5k views

Saving and uploading images in a database

I am working on a small method that saves uploaded images and records the images in a database. ...
18
votes
5answers
476 views

“Heat spot” image generation

I wrote a function that generates an image like: The function is as follows: ...
10
votes
3answers
4k views

Writing .ppm images to a file

I am struggling with commenting and variable naming. My teacher says my comments need to be more explanatory and explicit. He says my variable names are also sometimes confusing. I was just wondering ...
8
votes
2answers
2k views

Color substitution in a BufferedImage

The setPixelColor function below changes the color of pixels. I need some suggestions to optimize this function. Example: ...
7
votes
2answers
271 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 ...
7
votes
2answers
815 views

Image cache for lots of images 2.0

Following from this question I created a Image cache of sorts (let's call it version 1.0) that used WeakReference as "cache" items. And this comes from the ...
7
votes
1answer
2k views

Finding and pasting images into a specific cell

The below macro finds and pastes images into column A. While the macro works, it starts to slow down when running 500+ images. I am not too familiar with the VBA language, does anyone have any ...
6
votes
1answer
11k views

“Histogram of Oriented Gradients” (HOG) feature detector for computer vision

Here is a function that I've only slightly modified from its original context, found here. Before mentioning anything else, it should be noted that I'm desperately trying to optimize this code for ...
6
votes
3answers
222 views

Class scheduling tool with image output

I have a multilayered dictionary that contains information about classes. I am using this to code an automatic schedule builder that I will eventually add to a separate Tkinter application I made that ...
6
votes
1answer
58 views

Analyzing spoke overlaps during rotation

For a personal project that I've recently started I have to analyze the rotation of two shapes with sets of spokes, where the spokes are evenly-spaced, and split into a given number. That is, if I ...
5
votes
3answers
11k views

Rotate image 90 degree clockwise

* Time complexity: O(N) * Memory complexity: \$O(1)\$ Is my calculation of complexity correct for this code? ...
6
votes
1answer
240 views

“Heat spot” image generation using bilinear interpolation

This is the code from my answer to a another CR question. My goal was to provide a fast and simple computation and I'm rather unsatisfied with it. It's maybe 10 times faster than the original, but ...
4
votes
1answer
329 views

Security: Scale and cache images

Specification A simple PHP script resizes images on-the-fly. The script is called by the web server's 404 handler to return a scaled version of the original. For example, if the original image is at: ...
4
votes
1answer
140 views

Transform Bitmap object into jagged array of RGB tuple values

I've been working on this module with the assistance of codereview, and based on the responses and my own research, this is my project so far. The goal behind the code is that it starts with a .NET ...
4
votes
1answer
3k views

Image cache for lots of images using WeakReference on C#

I'm developing an application to manage a player card-library from an online game. Each card has an image that is stored on disk with a numeric code, for example, the card with ID=1234 has his image ...
3
votes
1answer
340 views

Transforming a byte array into an array of byte arrays with F#

This code is intended to be used with an image manipulation library that I'm working on, and the goal is to take the raw byte[] data from an image, and transform it into a 2D array where each position ...
3
votes
1answer
166 views

Locating a bitmap inside another (larger) bitmap with F#

This is my firstish (heavily rewritten) go at the completed project that I've been working on with CodeReview assistance, so further advice is appreciated! See here, here and here for the past history ...
2
votes
5answers
849 views

Simple image rotation script

I am writing a simple image rotation script. Users press either the prev or next button to view the previous or next images. It works well, but the code looks over the top. Is there a way I can reduce ...
2
votes
2answers
166 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 ...
2
votes
0answers
254 views

Super Resolution in the Wolfram Language

This is a wolfram language program I wrote for super-resolution, in this case meaning to guess at how to increase the the resolution, and so detail shown in a raster image such as a photograph. It ...
1
vote
1answer
192 views

Load bitmap object data into array of byte values

I'm building this as part of a larger class to rapidly search for smaller images inside larger images. This is my first serious F# project so comments especially concerning style and organization are ...
0
votes
1answer
939 views

Pure JS multi-slide carousel

On our home page we need simple multi-slide carousel. It is our highest traffic page, so we decided to remove all libraries (including jQuery) in order to increase page speed. Functionality we trying ...
0
votes
1answer
198 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 ...