image-manipulation

Cross-browser way to flip html/image via Javascript/CSS?

扶醉桌前 提交于 2019-11-28 15:01:59
Is there a library/simple way to flip an image? Flip image like this: AABBCC CCBBAA AABBCC -> CCBBAA I'm not looking for animations , just flip the image. I've googled to no avial and only found a complex version that utilized SVG on MozillaZine which I'm not confident that it'll work cross-browser. The following CSS will work in IE and modern browsers that support CSS transforms. I included a vertical flip class just in case you might want to use it too. .flip-horizontal { -moz-transform: scaleX(-1); -webkit-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1); -ms-filter:

Which library should I use for server-side image manipulation on Node.JS? [closed]

淺唱寂寞╮ 提交于 2019-11-28 14:57:33
I found a quite large list of available libraries on Node.JS wiki but I'm not sure which of those are more mature and provide better performance. Basically I want to do the following: load some images to a server from external sources put them onto one big canvas crop and mask them a bit apply a filter or two Resize the final image and give a link to it Big plus if the node package works on both Linux and Windows . Andrew Андрей Листочкин Answering my own question I spent two days digging through Node.js graphics libraries. node-canvas I tried it first since I'm quite familiar with <canvas>

increasing the resolution of a grayscale image

有些话、适合烂在心里 提交于 2019-11-28 14:53:35
I have a grayscale image, and need to increase its resolution. How can this be done in MATLAB? Would it mainly be done by multiplying the dimensions of the image for instance? You need to perform interpolation. There are many ways to do this. Use imresize (e.g. imgOut=imresize(img,scale,method); ), or if you do not have the Image Processing Toolbox, consider the following code: function imres = resizeim(I,outsize,interpalg) if nargin<3 || isempty(interpalg), interpalg='cubic'; end rows=outsize(1); cols=outsize(2); vscale = size(I,1) / rows; hscale = size(I,2) / cols; imgClass = class(I); imres

how to implemet Digital picture frame in ios app? [closed]

南笙酒味 提交于 2019-11-28 14:22:30
I want to develop an application which shows photos like digital picture frame (One by one photo slides automatically and shows animation). How to do it ? Is there any sdk available or I have to do it by my own logic ? Please help me if anyone can suggest any reference link. This is not exactly an answer but might help You can install cocoa pods using sudo gem install cocoapods then go to https://cocoapods.org/ and search for the components you need. most of the pods will have necessary info how to use it You can also visit https://github.com/vsouza/awesome-ios this will have a curated list of

Convert a image to a monochrome byte array

*爱你&永不变心* 提交于 2019-11-28 14:22:19
I am writing a library to interface C# with the EPL2 printer language. One feature I would like to try to implement is printing images, the specification doc says p1 = Width of graphic Width of graphic in bytes. Eight (8) dots = one (1) byte of data. p2 = Length of graphic Length of graphic in dots (or print lines) Data = Raw binary data without graphic file formatting. Data must be in bytes. Multiply the width in bytes (p1) by the number of print lines (p2) for the total amount of graphic data. The printer automatically calculates the exact size of the data block based upon this formula. I

How to mirror an image file? (2.2+)

廉价感情. 提交于 2019-11-28 12:07:29
I have a PNG file that I want to use for an overlay - however, this file has to be mirrored (and rotated by 180°), but in order to save space, I don't want to place the mirrored file in the apk, but do this action programmatically. How can I do this with Froyo and above? Scaling by -1.0 causes the image to be flipped. Assuming bmp is the bitmap you want to mirror (here on the x axis) you can do : Matrix matrix = new Matrix(); matrix.preScale(-1.0f, 1.0f); Bitmap mirroredBitmap = Bitmap.createBitmap(bmp, 0, 0, bmp.width(), bmp.height(), matrix, false); If you don't want to create a second

Client-side conversion of rgb-jpg to 8-bit-jpg using Canvas+HTML5

邮差的信 提交于 2019-11-28 11:40:23
Many articles shows ways of converting jpeg files to grayscale using canvas+html5 at the client-side. But what I need is to convert an image to 8bit grayscale to reduce its size before uploading to my server. Is it possible to do it using canvas+html5? The whatwg specification mentions a toBlob method, which is supposed to convert the canvas to a jpeg or png and give you the binary representation. Unfortunately, it isn't widely supported yet. So all you can do is use getImageData to get an array of the bytes of the raw image data. In this array, every pixel is represented by 4 bytes: red,

PHP/GD - Cropping and Resizing Images

纵饮孤独 提交于 2019-11-28 11:20:47
I've coded a function that crops an image to a given aspect ratio and finally then resizes it and outputs it as JPG: <?php function Image($image, $crop = null, $size = null) { $image = ImageCreateFromString(file_get_contents($image)); if (is_resource($image) === true) { $x = 0; $y = 0; $width = imagesx($image); $height = imagesy($image); /* CROP (Aspect Ratio) Section */ if (is_null($crop) === true) { $crop = array($width, $height); } else { $crop = array_filter(explode(':', $crop)); if (empty($crop) === true) { $crop = array($width, $height); } else { if ((empty($crop[0]) === true) || (is

PHP temporary file upload not valid Image resource

时光怂恿深爱的人放手 提交于 2019-11-28 10:58:41
问题 Hi I have a class for resizing images (resizeManager.php): Class ResizeManager { // *** Class variables private $image; private $width; private $height; private $imageResized; function __construct($fileName) { // *** Open up the file $this->image = $this->openImage($fileName); // *** Get width and height $this->width = imagesx($this->image); $this->height = imagesy($this->image); } ## -------------------------------------------------------- private function openImage($file) { // *** Get

Image rotation algorithm

喜欢而已 提交于 2019-11-28 06:26:02
I'm looking for an algorithm that rotates an image by some degrees (input). public Image rotateImage(Image image, int degrees) (Image instances could be replaced with int[] containing each pixel RGB values, My problem is that i need to implement it for a JavaME MIDP 2.0 project so i must use code runnable on JVM prior to version 1.5 Can anyone help me out with this ? EDIT: I forgot to mention that i don't have SVG APIs available and that i need a method to rotate by arbitrary degree other than 90 - 180- 270 Also, no java.awt.* packages are available on MIDP 2.0 earino One of the best pages