Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
This tag is for questions related to the loading, formatting, saving, compression, and display of data representing pictures.
4
votes
JPEG extraction script
There is an End-of-data marker FF D9, but you can't scan for it blindly, because those bytes can also appear within a JPEG image. … In fact, the FF D8 start-of-image marker can also appear within a JPEG image for the same reason. Therefore, your technique is invalid. …
9
votes
Determining if 2 images are the same
I'll focus on problems in compare().
You're using the wrong equality comparison for the bitmap size. You need to compare the contents of the Size objects, not whether they are the same reference.
A …
4
votes
Accepted
Comparison methods for Photo objects
You seem confused. Given two objects, a.Equals(b) tests whether they have equivalent content. Basically, what you wrote as UnnamedCompareMethodB() should actually be the Equals() method.
I wouldn't …
0
votes
Converting an image to a bitmap
Half of the code deals with reading a file into a byte array, which is a very generic operation. Split the code into two functions, one accepting a file and another accepting a byte array. The forme …
6
votes
Rotate an image by 90 degrees
I suggest:
public interface ImageTransformation {
public Pixel[][] transform(Pixel[][] image);
}
public class Clockwise90Rotation implements ImageTransformation {
...
}
public class AntiClockwise90Rotation … = t.transform(image);
} …
2
votes
Calculating luma of a rect in an image of .yuv format
I think you've gotten the bounds of the sample area wrong. j should range from left to right, and rowStartPosition should not include left.
(0xff & ((int)yuvImage[bytePosition])) deserves a comment e …
1
vote
Accepted
Makefile for automatically processing image files
Overview
As I understand it, you want use GNU Make to do…
content/part?/raster/bw/* — the ultimate goal
content/part?/raster/col/* — a staging place before conversion to grayscale
content/part?/r …
2
votes
Accepted
Displaying an overlay when hovering over photos
Semantic markup
The search.png image is an artifact of the presentation; it isn't really part of the content. Therefore, it should not be written in the HTML. … For your real site, you should use relative URLs and a pre-scaled magnifying glass image. …
5
votes
Accepted
Color substitution in a BufferedImage
I think that changeColor or substColor would be a more appropriate name for this function.
I don't see why the function should write out its result to a file. That's a violation of the Single Respon …
3
votes
Decoding grayscale PNG and performing Prewitt operator for edge detection
Image decoders are hard to write well — you're wandering onto a bloody battlefield. … You could end up calling any four-character function or constructor in the main namespace, based merely on whatever chunk code the "image" specified. …
11
votes
Accepted
Square root image filter tool in Python
PEP 8 specifies four spaces per level of indentation. Since whitespace matters in Python, this is a pretty strong convention.
You should round() the results to the nearest integer rather than trunca …
2
votes
Accepted
Security: Scale and cache images
For security, I've explicitly listed the allowed characters for the image filename.
# You probably want to analyze PATH_INFO rather than QUERY_STRING
$path = pathinfo($_SERVER['PATH_INFO']);
if (! …
1
vote
Accepted
Writing my own jQuery plugin
This plugin looks like an attempt to reinvent image maps using a canvas. Most of this code could be eliminated in favour of techniques that were available in 1997. …
0
votes
Distinct nearest pixels for floating-point coordinates
Ok, i think i have found the best solution myself, with a little help from Otus, for the zip-set-unzip part, though i think my way of getting it to integers is more pythonic?
r1 = numpy.array(numpy.r …
3
votes
Accepted
RFC PS Rasterizer Library API
I would expect the library to behave more like a printer, in that it would produce an image for every showpage command. …