Render highcharts on the server, but the images are not clear - highcharts

I'm using the phantomjs + highcharts-convert.js solution to render the highcharts on a ubuntu server.
Bug the exported images are not clear,especially the labels, title.
Sample Image
And as you see, the backgroud is black
system info:
ubuntu 10.04 server 64bit

I have solved the problem.
The feeling of 'unclear' is the illusion caused by the dark ground(jpg) or invisible ground(png).
Exporting png images and putting it on a white background would fix this.

Related

Why does my PNG image look different in OpenCV?

The image is downloaded from a slide captcha and I'm trying to find the gap in this image with OpenCV.
But the gap is missing in the image opened with cv2.imshow() .
I am not familiar with PNG nor OpenCV so I'm so confused right now.
I searched a lot but found nothing useful maybe caused by using wrong keywords.
image opened with Windows Viewer:
image opened with cv2.imshow() :
I'm wondering why the same image in image viewer and OpenCV looks different and is there an easy way to locate the difference?

OpenCV reads invisible image

I edited a simple png image with gimp, but it made transparent background black. So I tried undo'ing it, but nothing changed. Then I completely deleted all pixels (ctrl+A and delete) - this made image completely blank (white). But then I read it with OpenCV (python, ubuntu 16.04) and I still could see that old picture!
This is simple code I used to read image. As you can see it is completely blank (white).
But then I run the code and I can still see the old picture!
Here you can see - it is completely empty. I opened it with Firefox, Gimp, default ubuntu image viewer, windows photo viewer - same blank image.
So I decided to try something and I drawed with Gimp on that picture:
And I ran same code again:
After undo'ing question mark image returned to same. I figured - it could be some software error - I rebooted - same. Then I copied 'nothing.png' to Win10. Same code - same result. Image is about 449kB size. Here it is:
What the hell is going on here?
GIMP didn't erase the RGB data, it just sets the alpha channel to 0.
That's enough... unless you ignore the alpha channel.
OpenCV ignores the alpha channel... it's just another channel, not special at all. OpenCV can read and write RGBA data, and you can use the alpha channel like any other channel. It's just that display with imshow ignores the alpha channel and shows you the RGB data.

Different color svg image depending on the browser

Well, here is my problem.
I'm developing the front end of a website using rails. and I'm using svg images. If you go to http://de-regalos-qa.herokuapp.com/products/9 you would see an image with cards (visa, mastercard, etc) this image looks like transparent or with a very light opacity but if you download the image you would see the image with the original colors. This only happens with chrome and firefox but not with safari. This happens only with two of the images from all my site. I dont understand why.
Chrome screenshot:

images on iOS app causes multicolored lines through images

I was hoping that someone could enlighten me on what this error means:: ImageIO: PNG IDAT: CRC error
It causes some images to show up as a bunch of multicolored lines and not the image as well as puts either a thick black solid line through the app or a bunch of multicolored lines.
The images are png's. I am not experienced with images. My design guy sent me these and he's not sure what's causing that because his experience is with websites and not iOS apps.
I also didn't not find too much on this online. My guess is that the images are corrupted.
Fixed it. I just had to go to build setting and change Compress PNG Files to NO instead of YES.

Converting a multi page pdf to multiple pages using a single command

I want to convert multi page pdfs into single page images efficiently.
I already know how to do this one page at a time with imagemagick. For example,
convert x.pdf[2] x3.jpg
will give me the 3rd page of the pdf as an image. So if I figure out how many pages are in the pdf using identify then I can loop through and convert all pages in the pdf to images. This method can however take a while. For example a 15 page pdf could take anywhere between 15-30 seconds.
According to answers that I have seen elsewhere (also on the imagemagick forums) the following imagemagick command should split a pdf into multiple images.
convert x.pdf x-%0d.jpg
but all this ends up doing is creating the first page named x-0.jpg
As an alternative I have tried using pdftk with the burst capability. The problem I faced there is that burst does not work in all cases. It does for some pdf's and does not for some others.
Any suggestions on how to improve things would help.
My OS is Mac OSX Lion but I do need this working on CentOS 6 as well.
You're missing the quantity of digits. Use:
convert x.pdf x-%04d.jpg
Where 4 means 4 digits will be show on the page count.
If you use Graphicsmagick on Debian or ImageMagick on macOS you probably have to add ADJOIN to your command.
So it should look like
convert x.pdf +adjoin x-%04d.jpg
When I tried to convert my multi-page pdf, the resulting image files had a gray background despite the pdf having a white background. (#John P commented on it on the accepted answer, but I couldn't get his comment to directly work for me.)
Here's what worked for me to make the background white:
convert -authenticate yourpassword -background white -alpha remove -alpha off -density 300 -quality 80 -verbose "Your file.pdf" "Your file.png"
My pdf had a password hence the authenticate.
You can see a summary of the options here:
-authenticate value decipher image with this password
-background color background color
-alpha on, activate, off, deactivate, set, opaque, copy", transparent, extract, background, or shape the alpha channel
-density geometry horizontal and vertical density of the image
-quality value JPEG/MIFF/PNG compression level
-verbose print detailed information about the image
More detail: https://imagemagick.org/script/convert.php
And the alpha remove option: http://www.imagemagick.org/Usage/masking/#alpha_remove
Ran into the same issue. Reinstall Imagemagick to work in Mountain Lion. If you use brew the simply
$brew unlink imagemagick
$brew install imagemagick

Resources