Search found 11 matches

by insomniacp
2012-08-30T08:19:35-07:00
Forum: Magick++
Topic: Not Flattening When Saving JPG [SOLVED]
Replies: 1
Views: 6002

Not Flattening When Saving JPG [SOLVED]

Hi, Using the below code shows that when converting a png with alpha channels to a jpg image the alpha channels are not flattened but simply removed. I am wondering if there is a way to flatten the pixels before or during conversion so that the semi transparent pixels still retain the color they app...
by insomniacp
2012-08-29T06:14:54-07:00
Forum: Magick++
Topic: Pixel Access & L1 Cache Misses
Replies: 8
Views: 15899

Re: Pixel Access & L1 Cache Misses

That would explain it. I guess the simplest/best solution would be to generate a blank image and multiply the two images together and place the result on this blank image. That would allow me to have two const pointers which are fast and generating the new image doesn't take very long (if I recall p...
by insomniacp
2012-08-28T12:56:42-07:00
Forum: Magick++
Topic: Pixel Access & L1 Cache Misses
Replies: 8
Views: 15899

Re: Pixel Access & L1 Cache Misses

I have tried that but it is taking upwards of 25milliseconds to complete which I think is too long since it is about half the execution time of my program. I am hoping there is a faster method that would allow me to to edit the pixels. The fastest method would be a direct pointer to the pixels in me...
by insomniacp
2012-08-28T11:27:53-07:00
Forum: Magick++
Topic: Pixel Access & L1 Cache Misses
Replies: 8
Views: 15899

Re: Pixel Access & L1 Cache Misses

Is there a non const method for this? I will be needing to edit the pixel colors in some cases and these are the slow ones. getting a const pointer is near instant I agree. I implemented my own function but it seems cache->pixels doesn't allow for writing and gives a seg fault when I write to it but...
by insomniacp
2012-08-28T09:29:20-07:00
Forum: Magick++
Topic: Pixel Access & L1 Cache Misses
Replies: 8
Views: 15899

Re: Pixel Access & L1 Cache Misses

Is there any way to get direct access to the cache without making a copy of the pixel data? I have the following code and it takes 25.5ms to get the cache from a 1900x1900 image. dest.modifyImage(); Pixels viewFinal(dest); PixelPacket* finalPixels = viewFinal.get(0,0,dest.columns(), dest.rows()); Th...
by insomniacp
2012-08-24T11:35:32-07:00
Forum: Magick++
Topic: No exception with missing dir [SOLVED]
Replies: 1
Views: 6975

No exception with missing dir [SOLVED]

Hi, I am using the following code as a test case. #include <Magick++.h> #include <iostream> using namespace std; using namespace Magick; int main() { Image test; string url = "http://skreened.com/c/keuhxtodipbpomnwupfz"; try{ test.read(url); } catch(Exception e) { cout <<e.what()<<endl; } if(test.co...
by insomniacp
2012-08-23T11:38:54-07:00
Forum: Magick++
Topic: Pixel Access & L1 Cache Misses
Replies: 8
Views: 15899

Pixel Access & L1 Cache Misses

Hello once again, I have code that accesses an image's pixels. I have noticed using caching tools that when accessing the pixels it causes L1 and usually also an L3 cache misses quite frequently even after simply incrementing the PixelPacket pointer. This is in a very often run loop so its getting u...
by insomniacp
2012-08-22T11:51:00-07:00
Forum: Magick++
Topic: Problems with JPG & Opacity [SOLVED]
Replies: 3
Views: 8540

Re: Problems with JPG & Opacity

Yeah that seems to have done the trick.

Code: Select all

if(test.colorSpace()==CMYKColorspace)
{
	test.quantizeColorSpace(RGBColorspace);
	test.quantize();
	if(DEBUG) cout <<"colorspace is CMYKColorspace"<<endl;
} 
Is there any faster method to convert to RGB ColorSpace?
by insomniacp
2012-08-22T11:28:37-07:00
Forum: Magick++
Topic: Problems with JPG & Opacity [SOLVED]
Replies: 3
Views: 8540

Problems with JPG & Opacity [SOLVED]

Hello again, My current set up is taking a user uploaded file and converting it to mpc. This mpc is then what is loaded in the future. If the initial file was png then my code works. The code is a multiple layer simultaneous merge/multiply that does use the alpha/opacity channels. The code uses the ...
by insomniacp
2012-08-22T10:51:05-07:00
Forum: Magick++
Topic: Serializing Image Class [SOLVED]
Replies: 2
Views: 7283

Re: Serializing Image Class [SOLVED]

Exactly what i was looking for thank you.
by insomniacp
2012-08-21T08:19:51-07:00
Forum: Magick++
Topic: Serializing Image Class [SOLVED]
Replies: 2
Views: 7283

Serializing Image Class [SOLVED]

Hi, I am working on a program that has a large number of base images and it then dynamically generates images on top of those images. The base images are 1900x1900 png files and I have found that it takes about 250ms to load them into imagemagick and only about 10ms to read from the disk. Because of...