I have a line art, an animated transparent gif on page, made in photoshop.
#img01{
max-width:79%;
max-height:79%;
margin-top:3vh;
}
On small screen size (mobile), thickness of lines is too thin, and on screens over 1024px the lines are too thick ?
Is there a way to scale only the size of image, and keep the thickness of drawing ?
GIF is a raster-based image format. There's no way to nicely (and automatically) modify an image like that. What you're looking for is a vector-based image/animation format.
There are two obvious candidates for this:
Flash
SVG (Scalable Vector Graphics)
Related
I'm trying to plot a square TIFF image (1024 x 1024), but it displays it as a vertically stretched rectangle. I've tried adjusting margins in plotRGB and utilizing par(mar=c(0,0,0,0)), but I can't get the plot and output to be a square even though R recognizes the raster as a square.
Does anyone have any advice on how to simply fix this issue? I've attached two images, one of the original image and one of the image when plotted/exported in R. The goal of my program is to use histmatch solely to adjust the saturation of the source image to that of a matching reference image. The exported image thus cannot be vertically stretched, and must have no margin.
Screenshot of original image
R display and export of image
I would like to convert a transparent PNG to JPG and specify a background color for the transparent areas, without having to specify a dimension.
Essentially, what I'm looking for is a combination of Timber\Image's tojpg and letterbox filters, minus letterbox's width and height requirements.
#hailseitan: try grabbing the current dimensions of the image via the width() and height() methods and then feeding them into letterbox!
enter image description herePer this page (https://www.highcharts.com/docs/maps/custom-maps) I open inkscape, insert an image I want to draw over and then click on "resize page to selected object" with the image selected. This resizes the page to the size of my background image. I then create the shapes over the image as instructed in the page referenced above. What I want to do is when I paste the svg into the highcharts converter it keeps the shapes as drawn on the page so that I can then insert that same picture into the background of my highchart map on the page and the shapes I have drawn fit perfectly where I drew them on the image in inkscape. Instead it seems like the converter resizes the shapes to best fit the screen. If I didn't want the background image then this would be perfect however with this feature all the images drawn no longer "fit" in the background image where I drew them. Any way to get this to be a 1:1 size conversion so that inserting a background image works?
I'm drawing an image of 100 x 100 pixels in a PDFSharp document.
The image is drawn using:
g.DrawImage(image, new Point(x, y));
The issue here is that if I draw a rectangle starting in the same coordinates x,y and using 100x100 as dimensiones... the rectangle is larger than the image.
If I use the other overloads in DrawImage, setting the container rectangle, the image fits the rectangle but it loses quality (it is enlarged).
I think it is a problem of different resolutions or something like that.
Any ideas?
UPDATE: I resized the image to 133x133 to fit the 100x100 rectangle. What is the reason of this difference? A 33% difference.
MY SOLUTION: When retrieving the image and scaling it to fit the rectangle, you need to take into account that the size of your image is in PIXELS and when you draw in the PDF it is in points. If your image is in 96 DPI, you need to increase its dimension multiplying by "96/72" (that is the 33% I got), and that way you will see what you expect (even if you draw it using a container rectangle or just the starting coordinates).
Set image.Interpolate = false; to disable anti-aliasing and increase the sharpness of the small image.
There are no "pixels" in PDF. DrawImage has overloads that allow to draw the image with a specific size.
If the size is omitted (as you do), the size will be determined by the DPI setting of the image. Could it be your image is set to 96 DPI?
The rectangle 100x100 uses points - and there are 72 points per inch.
The image does not lose quality when you set the size. The "quality loss" depends on the zoom level of the viewer.
You can set a hint to prevent Adobe Reader from anti-aliasing the image.
Update:
Set image.Interpolate = false; to disable anti-aliasing.
I am using bitmapData and bitmap classes to render a mouse cursor on the display screen. The bitmapData consists of an area whose colors should be inverted according to the background color. This is a very basic thing which could be observed with text cursor(the vertical line with two small horizontals on top and bottom), when moved over the text area.
I want to be able to do the same with the pixels in my bitmapData, is there a way to find out the background color effectively and invert the color values?
In this process i will be redrawing the whole pixels, is there any other efficient way to do that ?
You can draw your cursor using BlendMode.INVERT
http://livedocs.adobe.com/flex/3/langref/flash/display/BitmapData.html#draw()
or simply put your cursor display object over your bitmap and set it's blendMode to INVERT.