Flash png has native width and height but is scaled - flash-cs5

i'm a flash beginner! When i import a png to the lib and add it to a movieclip, it has the origin width and height when i check the properties ... but it looks definitly scaled!
Why?
How can i make it have the origin width and height?
Thanks for any advice!

ok, i deleted the movieclip, made a new one and inserted the png again and now it has the right ratio ...

Related

FabricJS Scale/Zoom Canvas to fit container

I have my my FabricJS canvas inside a container with a fixed height/width in pixels. On the side I have a dropdown to change the canvas size to various presets. What I would like to do is automatically zoom out whenever I select a size that is either taller and/or wider than the container. So for example, if my container div is 800x600 and I select a canvas size of 1024x768, I want to zoom out so that the entire canvas is still visible. Conversely, I'd like to zoom in up to 100% if I select a smaller size (e.g. 200x200).
I found this example of zooming, but no matter how much you zoom out, the canvas size appears to stay the same. See screenshot:
How can I accomplish this?
As you can see here, the area with the thin red border is the canvas container. The white box is the canvas.
You can use the canvas.setDimensions function to accomplish this. You pass two arguments to it; the first is an object specifying the height and width to change the canvas to and the second indicates whether to change the css, the actual size of the canvas, or both.
For example,canvas.setDimensions({width: 750, height: 750}, {backstoreOnly: true} will set the actual size of the canvas to be 750x750, regardless of the display.
canvas.setDimensions({width: '750px', height: '750px'}, {cssOnly: true}) will set the display size of the canvas to be 750x750, regardless of the actual size.
I'm not 100% sure whether the width or height require a px after it for css or for backstore, but that's a pretty simple thing to check. Also, if no argument is passed for the second parameter, it will change both.

resizing chrome theme image to fit screen size

is there a way to make the background image of chrome theme resize with the height of the window? If so, can I also make the image resize with the height until it hist a certain ratio, and then resize with the width of the window?
It's not possible. Chromium source code doesn't have any stretching/sizing modes as you can see: theme_properties.h, theme_properties.cc and theme_service.cc
I've tried specifying an SVG image with width="100%" height="100%" for the background but it wasn't rendered, looks like only raster images can be used (WEBP, JPG, PNG, etc).
I tried use jpeg format, it resized itself, without anything added to manifest.json

inkscape command line svg to png - set both width and dpi

I want to convert a svg to a png with the inkscape command line tool. Despite of what is specified in the svg i want to set both the width of the resulting png and the dpi to be used. From the inkscape docu it seems this is not possible:
-w WIDTH, --export-width=WIDTH
The width of generated bitmap in pixels. This value overrides the --export-dpi setting (or the DPI hint if used with --export-use-hints).
I can't really understand how this could be as the width and the dpi used should not be directly related. How can I achieve to set both values.
Thanks, Martin
Ok got it I think, here as it goes in my concrete example:
In the svg the width is 2480 pixel (what you need for DinA4 300 dpi print). Now my mistake was to add "-d 300" to the inkscape call which doesn't make sense if the svg does not give the width in some unit. When doing so the resultant image has a width of 2480 * 300 / 90 = 8267 pixel . So if working with pixel in the svg you need to be aware of the fact the inkscape interprets this as 90 dpi ...
Well i guess only my confusion here yet happy to share ;-)

NivoSlider images to capture the exact width and height of the div

The slider images that I use is not the same width and height as the NivoSlider div.
I want my images to scale into the exact width and height of the NivoSlider div, with no losing any part of the image. How can i do this?
I am using the v3.2 JQuery plugin, not Wordpress.
You could do this in photoshop, but its hard if its not the same ratio, you will lose pixels
what you could do is resize the slider or edit the photo's

scaling svg figure

I tried to resize svg file to be opened in illustrator with smaller width and height(pixels or cm), I did this by changing width, height and viewBox attributes in <svg> tag, but it doesn't work at all. By search I have found that transform attribute via matrix value affects the real resizing of the figure, any ideas about ready made functions or scripts using python or librsvg to successfully scaling the svg figure, by the way I'm using inkscape to produce svg files. THANKS
You could try svg scour, that should be able to find a good viewBox to use (note spellning and uppercase 'B'). Then change only the width and height attributes to be whatever you want, and hopefully that should work.

Resources