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
Accepted
Detecting a certain amount of violet in an image - follow-up
private void ProcessImage(Image image)
{
if (image == null)
{
return;
}
using (var selectedImage = new Bitmap(image))
If the image is already a bitmap … It's probably worth having two cases and factoring out the code which works with Bitmap to a separate method:
if (image is Bitmap) Process(image as Bitmap);
else using (var bitmap = new Bitmap …
2
votes
Comparison methods for Photo objects
/// <summary>
/// Do all properties have the same value?
/// Usefull when determining if a Photo has been modified since last loaded
/// </summary>
Perhaps the problem is at a high …
5
votes
Getting the dominant RGB color of a bitmap
One useful performance trick when dealing with low-level pixel manipulations like this is that it's often possible to process red and blue together using the 8 bits for green as a gap. Since here you' …
2
votes
Extract images from a PDF or ZIP file
Extract all the pages as images.
Upload the images to blob storage.
For each test (i.e. set of images), queue another routine to process it.
Do you not think that's quite a lot to do in …
4
votes
Accepted
Making GIFs with Java
What if the image isn't of TYPE_INT_ARGB? … The more robust way of doing this would be to create a fresh IIOMetadata for each image, using new ImageTypeSpecifier(img) to create an appropriate ImageTypeSpecifier for each one. …
6
votes
Caching Color-Bitmaps as MemoryStreams
Spell-check: ReleaseIamge should presumably be ReleaseImage; uique should be unique.
private static void ReleaseMemoryStream(int id)
{
MemoryStream ms = null;
if (images.Try …
4
votes
Parallelly resizing mutiple photos
The benefit of async/await with something like image processing is that you can keep the CPU busy even when one of the coroutines is blocked on I/O. … If you want to make an async version, the image load should be async. …
4
votes
WPF Bitmap / BitmapFrame to multi-page / multi-frame TIFF with JPEG encoding
Henrik covered a number of points which I would have raised, so I won't repeat those.
namespace TIFF
{
public class Jpeg
seems inconsistent to me. The convention in .Net is to camel-case ac …
6
votes
Loading BitmapImages out of a Zip file
var zipFile = ZipFile.OpenRead(ChapterLocation);
...
zipFile.Dispose();
One word: using.
using (var stream = z.Open())
{
using (var mstream = new MemoryStream())
…
3
votes
Accepted
Polynomial curve-fitting over a large 3D data set
In terms of possible speed optimisations there's not much to work with, but one thing does stand out:
def func(t, a, b, c, d, e, f):
return a+ b*t+ c*(b*t)**2+ d*(b*t)**3+ e*(b*t …
13
votes
Accepted
Determine if an image is opaque or transparent
image)
{
var bitmap = image as Bitmap;
if (bitmap ! … = null)
{
return IsOpaque(bitmap);
}
using (bitmap = new Bitmap(image))
{
return IsOpaque(bitmap);
}
}
Now, taking into account …
14
votes
Julia Fractal Drawing in C++
There's already a good answer, so I'm just going to raise a couple of small points.
I had the same thought as Toby Speight about saving the square root of abs(z), but I would apply it also in the log …
6
votes
Accepted
Detecting if image taken by camera is too dark
The other thing which would probably give a moderate speedup is changing the way the image is divided into chunks. … Image formats are compressed: you will get better performance if the way you access the image respects the compression format. …