resize

Resize images in Flex using as3

跟風遠走 提交于 2020-01-02 21:51:07
问题 I am loading an image using a Loader. Once loaded, I can get the bitmap data using Bitmap(event.target.loader.content).bitmapData . However since the images I am loading are quite large (around 2000 x 1600), I would like to reduce the size and create a new smaller bitmap maybe 200 or 300 pixels wide, sort of like a thumbnail. I think it has to do with creating a new BitmapData with the new size. However I am not able to get that working properly. Any ideas? 回答1: Not tested, but this should

TinyMCE: Disable 'resizable' function for specific div?

空扰寡人 提交于 2020-01-02 20:18:09
问题 I have a plugin in Wordpress that uses jQuery Resizable to resize dialogs in TinyMCE. There's one <div> in particular (shown below) that I don't want to be resizable. How do I accomplish this? This is the outputted <div> I don't want resizable: <div class="ui-dialog ui-widget ui-widget-content ui-corner-all wp-dialog ui-draggable ui-resizable" tabindex="-1" role="dialog" aria-labelledby="ui-id-1"> This is the resizable handle's output: <div class="ui-resizable-handle ui-resizable-se ui-icon

Adjust the screen in pdfViewer

蹲街弑〆低调 提交于 2020-01-02 13:21:27
问题 I have an application that views pdfs, the problem is that the pdf out of the screen, and if I zoom out the pdf is not focused. I am Using code from this SO answer. Read PDF Using PDFViewer Any ideas? Thank you 回答1: To increase the view size of PDFVIEWER.jar Create an ABSTRACT CLASS or just copy the code HERE For me I name the class "PdfViewerActivities" To get the desired amount of zoom please refer to the logcat which is trigger when you click the button of zoom icon in the pdf page

Adjust the screen in pdfViewer

心不动则不痛 提交于 2020-01-02 13:21:08
问题 I have an application that views pdfs, the problem is that the pdf out of the screen, and if I zoom out the pdf is not focused. I am Using code from this SO answer. Read PDF Using PDFViewer Any ideas? Thank you 回答1: To increase the view size of PDFVIEWER.jar Create an ABSTRACT CLASS or just copy the code HERE For me I name the class "PdfViewerActivities" To get the desired amount of zoom please refer to the logcat which is trigger when you click the button of zoom icon in the pdf page

dragging and dropping images into a Web page and automatically resizing them with HTML File API

倖福魔咒の 提交于 2020-01-02 08:44:10
问题 I want to create Web pages that allow users to drag and drop images into boxes in various parts of the page, so that they can then print the pages with their images. I want the image to automatically resize when it's dropped in the box. I combined some of the code at http://html5demos.com/file-api with some of the code at http://html5demos.com/file-api-simple to get something like I want. In the current version of the code (below), the image width does not resize the first time you drop the

Resizing and cropping image with GD while retaining aspect ratio

懵懂的女人 提交于 2020-01-02 04:30:27
问题 I'm currently coding an uploader script based on Uploadify. Right now I resize the given image and watermark one of the sizes. It all works well, but I need the script to resize the height and then crop the width so that the aspect ratio does not get messed up. This is my code so far: if ($fileExtension == "jpg" || $fileExtension == "jpeg" || $fileExtension == "png" || $fileExtension == "gif"){ // GD variables: list($width, $height, $type) = GetImageSize($uploadedFile['tmp_name']); // Image

WPF - Expand Window to the Left

一个人想着一个人 提交于 2020-01-02 02:35:11
问题 I have a WPF window with expandable panel (via Expander ). The panel is on the left side of the window, and when expanded the window grows to fit the content. By default, windows are anchored to the top-left, so my window grows to the right. I'd like the window to grow to the left. I tried to do the following in the Window.SizeChanged event: private void onWindowSizeChanged(object sender, SizeChangedEventArgs e) { Left -= (e.NewSize.Width - e.PreviousSize.Width) } and it works, but the growth

wpf resize complete

一个人想着一个人 提交于 2020-01-02 00:47:28
问题 So I need to procedurally generate a background image for a grid, it only takes .1sec. So I can wire into the SizeChanged event, but then when you resize the chart, it goes and fires the even maybe 30 times a second, so the resize event lags out signifigantly. Does anybody know a good way to wire into the resize event and test weather the use is done resizing, I tried simply checking for the mouse up/down state, but when the resize event fires the mouse is pretty much always down. 回答1: On

How do I make it possible to resize a composite by dragging the corner

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 19:20:35
问题 I am working with SWT and I would like to be able to resize a composite by dragging the corner of it, the same way that you can resize a shell. I'm sure someone out there has implemented a good solution. Thanks. 回答1: I think what you are looking for can be implemented with org.eclipse.swt.widgets.Tracker here is sample working code: public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.open(); final Composite b = new Composite

Is it possible to resize an embedded .mov?

安稳与你 提交于 2020-01-01 17:03:37
问题 I embed .mov clips that sometimes are bigger than the place where I show it, so I want to resize the clip. Have tried with width and height but that only changes the area to display it; it does not resize the actual movie. Is it possible to resize the movie size? If yes, how? 回答1: Yes, you need the scale attribute: <embed src="sample.mov" width="200" height="240" scale="tofit"> There's a full reference for QuickTime video attributes here. 回答2: Sometimes the scale attribute doesn't work. It