Adding a background image to Gnuplot - background-image

I want to put a jpg image as background for a gnuplot output file.
The goal is to have a nice looking web based weather station.
Right now I'm using gnuplot png output with transparent background setting and then setting a background image in the html code. But the result looks funky around the text. Check out the current state at :
http://drgert.dyndns.ws:8000/bmp085/bmp085.php
So I was thinking it might be better to set the background in gnuplot itself. I can set a background using a rectangle object to cover the plot area. But is it possible to use a jpg in that rectangle?
Thanks,
Gert

Basically you could add a background image to the plot like shown in Gnuplot image on axis, but with filetype=jpg. But that wouldn't look like you showed in your link, but would be only inside the graph.
You actual problem is, that the png terminal, which uses libgd, seems to have problems to render the transparency when anti-aliasing the fonts. You can use the pngcairo terminal, which doesn't have this problem, see the following example:
set terminal pngcairo transparent
set output 'transparent.png'
plot sin(x)
set output

Related

How can clearly show image in Matlab?

I want show large image in Matlab gui, but when show my image not clearly and not possible for read. for example show my image in Matlab in follow.
Any way show my image like this image?
I know can use zoom in and zoom out, but image in first should clearly.
You can use InitialMagnification to preview the image at your native resolution. If your concern is getting a nice looking zoomed-out image, you can try using reduce parameter of imshow to sub sample it.

upload and preview as repeated background image

I am searching for a tool on web but didnt got any success their at all. I want to have something like upload and preview the image as background as repeated one or any other alternative...
I have this sample:
How can I preview and cut the image as a perfect background image as repeated one. Is it possible in Photoshop or in some similiar products?
The trick i have recovered is crop a part of the image in a big canvas of Photoshop and then making the deuplicate copies of the layers...
If the image seems like irregular it means the cropped image is wrong so you have to change with a other or larger part of the image...
If it is regular and doesn't cut at the side onto the edge, it means image is perfect making background repeated...
Thanks...

Color overlaying algorithm

I'm looking for an algorithm to overlay a color on top of existing picture. Something similar to the following app (wall painter): http://itunes.apple.com/us/app/wall-painter/id396799182?mt=8
I want a similar functionality so I can paint walls in an existing picture and change them to a different color.
I can work both in yuv or rgb mode.
To successfully paint the walls in a picture, you have to do two steps:
Find the boundary of the wall within the picture (select the part of the image to be colored)
Apply the desired color to the selected area
The first step is the hard part. It similar to what Photoshop's magic wand tool would do. And indeed a search for magic wand algorithm turns up a few good articles such as this article with Objective-C code.
The second step is much easier and can be achieve with CGContextSetBlendMode and CGContextDrawImage.
You could try drawing into a graphics context with kCGBlendModeColor. From the documentation:
Uses the luminance values of the background with the hue and saturation values of the source image. This mode preserves the gray levels in the image. You can use this mode to color monochrome images or to tint color images.
Experimenting with other blend modes might also do the trick. See the documentation for details (search for "kCGBlendMode").
The RGB and YUV color models are not really great for changing colors in this way. I think the best color model for this is HLS.
Link: RGB to HLS and HLS to RGB conversion source code
H (hue) will change the base color
L (luminance) will change the brightness
S (saturation) will change the amount of color
You can evaluate the effect of these three components in a photo editing app, like Photoshop of The GIMP.

Why images in Crystal Report with white background doesn't show as pure white?

I'm putting an image in a crystal report (using Crystal Reports for Visual Studio 2005). The image is a product logo with a white background, and the report has a white background too. But when I run the report you can see it's not quite white. The off-white color is barely visible, but it is visible and more so when printed.
I've tried a variety of image formats, and tried transparent images too but they don't seem to work (transparent pixels show as black). When I use a different image I notice that the faint non-white color changes - as if it's a function of the colors in the image.
Anyone else encountered this? Any suggestions?
It can be solved directly in the report by checking the option: Retain Original Image Color Depth.
The docs says:
If you want images in your report to keep their original color depth when they are encapsulated, select this option. Otherwise, all images are converted to 8 bits per pixel before being encapsulated.
To check this option go to:
File -> Report Options -> Retain Original Image Color Depth.
Solution to this problem is using images with low color depth. It worked for 8bit PNGs.
If you are generating your own images with Adobe Fireworks you will need to export the image as 8-bit PNG. You can do it using the export tool then in the Options tab change the format to PNG 8 as show in the screenshot below:
If your image doesn't have too much color swatches (< 256) this will not affect the quality, otherwise yes.
It sounds as though the white in the image is actually off-white - have you tried printing the image from another app, such as a browser?
Take a look at this http://kenhamady.com/cru/archives/1480
When I export a png from Photoshop using "Save for Web & Devices" The white color photoshop was picking was actually 1/0/0/0 (CMYK).
In photoshop you can edit these colors before saving, I changed this color to be completely white which seemed to fix my issue.
Programmatically I found reducing the image to 16 bit color resolved the issue
Bitmap result = new Bitmap((int)250, (int)123, System.Drawing.Imaging.PixelFormat.Format16bppRgb555);
I found that even in Crystal Reports for Visual Studio 2012 images need to be of a lower color depth than what is defaulted by many modern editors. High Res images display horribly in the crystal report viewer.
Quick Fix
In GIMP -> Image Menu -> Mode -> Select Indexed As Color Mode
In Index Color Conversion Window
Use Web Optimized pallet.
Ta da. Enjoy.

iPhone transparent images rendering poorly

I'm developing an iPad application. I have been provided with a PNG image that contains some transparency - basically a drop shadow. The problem I'm having is that this is rendering poorly within the application, both on the device and in the sim.
I've made up some samples to illustrate. The first is how the image appears in the PSD (correctly that is). The second is how it appears on the device. You can see that the strip of shadow in the middle of the image is distinctly more yellow and poorly looking.
PDF http://www.aspyre.com.au/stackoverflow/photoshop.png On Device http://www.aspyre.com.au/stackoverflow/device.png
Any ideas what I'm doing wrong?
Edit: Links to files:
- PNG
- PSD
Edit 2: I've also tried pngcrush to remove the gamma, in case that was causing a problem, but no luck. Directions I followed were here: pngcrush
The reason you're getting a colour in your shadow is because the PSD's shadow layer is set to Multiply and has a colour in it. When you export it without a background, Photoshop is unable to multiply it to anything and just uses the layer as is. You need to grab the selection of the shadow layer, create a new layer, and fill that selection with black. Then set that new layer's opacity to something that mimics the old shadow.
Also I recommend you use Save-For-Web if you don't already. The colour-profile you use isn't much of an issue then as it will be stripped. However the point is valid that you want to be in sRGB when making iPhone/iPad graphics.
Link to your PSD adjusted: PSD
Common mistakes:
Your color space is non-standard. Either use no color space, or specify sRGB (strongly preferred).
You didn't save the PNG with gamma information included.
Without access to the actual files we're grasping at straws.. Maybe you have an 8-bit instead of 24-bit png?
For your shadow, use black instead of gray. Then adjust the transparency. That should fix it.
I had a similar issue that I resolved by disabling compression for an image. This is done in XCode by removing the .png extension. You can disable png compression for an entire project by editing the 'Compress PNG Files' project setting, but it is not recommended.
More details about Xcode PNG compression: http://iphonedevelopment.blogspot.com/2008/10/iphone-optimized-pngs.html