resize

Is it possible to resize an embedded .mov?

落花浮王杯 提交于 2020-01-01 17:02:12
问题 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

How to resize an svg (with batik) and display it?

a 夏天 提交于 2020-01-01 12:13:14
问题 I have a svg file of 100x100 pixels (for example). I am using Batik. If I do a : JSVGCanvas svg = new JSVGCanvas(); [...] svg.setSize(10,10); It will only show this part of the picture and not the resized image. Do you know how I can display a resized svg picture ? Thanks ;) 回答1: You need to ensure that the document you are displaying has a viewBox="" attribute set on its root <svg> element. For example, specifying viewBox="100 100 300 200" indicates that the region (100,100)→(400,300) will

How to resize an svg (with batik) and display it?

◇◆丶佛笑我妖孽 提交于 2020-01-01 12:12:11
问题 I have a svg file of 100x100 pixels (for example). I am using Batik. If I do a : JSVGCanvas svg = new JSVGCanvas(); [...] svg.setSize(10,10); It will only show this part of the picture and not the resized image. Do you know how I can display a resized svg picture ? Thanks ;) 回答1: You need to ensure that the document you are displaying has a viewBox="" attribute set on its root <svg> element. For example, specifying viewBox="100 100 300 200" indicates that the region (100,100)→(400,300) will

How to properly create a UIButton that resizes to the text length in Xcode 4?

混江龙づ霸主 提交于 2020-01-01 11:51:06
问题 In Xcode 4 you should be able to design UI interfaces that do resize based on their content. Still it looks that the are some missing pieces regarding how to obtain this. I have a button that is configured in the XIB file to resize to the right and it has plenty of space to do that. The problem is that it doesn't seam to resize the button when the label is updated. This can be fixed by adding a [button sizeToFit]; after the label is changed. Still I am looking for a solution that works

C# WPF Move the window

与世无争的帅哥 提交于 2020-01-01 10:46:05
问题 I have added the following parameters to my Window : WindowStyle="None" WindowStartupLocation="CenterScreen" AllowsTransparency="True" ResizeMode="NoResize" Background="Transparent" And now I can't move the Window , so I have added the following part of code to my Window : #region Window: Moving private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { DragMove(); } #endregion Also I must specify that my XAML code in my Window is the following (the Window look like the

Why does a UIImageView get resized when assigning a new image in iOS 6?

China☆狼群 提交于 2020-01-01 08:59:52
问题 An application contains a UITableView containing a custom UITableViewCell. The cell in turn contains a UIImageView. The problem is that setting the image in cellForRowAtIndexPath makes the image take up the entire UITableViewCell area: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { CustomCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"CustomCell"]; NSString *path = [[NSBundle mainBundle] pathForResource:@"bigrect"

Cropping a UIImage according to the viewport inside a UIScrollView

安稳与你 提交于 2020-01-01 07:00:05
问题 I have a UIImageView (initialized with Aspect Fill) inside a UIScrollView. The user shall use that to resize and position a UIImage to his like, press a button and then exactly what he sees on screen would be sent to a server, only in the original image coordinates. In other words, the resulting image would be bigger than the image on screen. Here's the essential part of my code so far: // select the original CGFloat imageRatio = self.imageView.image.size.width / self.imageView.image.size

How to crop PDF margins using pdftk and /MediaBox

自闭症网瘾萝莉.ら 提交于 2020-01-01 05:16:21
问题 I used pdftk to uncompress a PDF and then opened it as a text file. I want to edit the /MediaBox field, which is in my case /MediaBox [0 0 612 792] I would like to reduce the margins, for instance /MediaBox [100 0 512 792] Unfortunately it doesn't work. I can change the 0 into a 2 or a 9 but I cannot put 100 for instance. Any idea why? 回答1: use sed to replace any occurrence sed 's/MediaBox \[0 0 612 792*/MediaBox \[100 0 512 792]/g'<in.pdf >out.pdf or podofobox (inside podofo utils ) http:/

VBA Excel Button resizes after clicking on it (Command Button)

廉价感情. 提交于 2020-01-01 04:13:07
问题 How can I stop a button from resizing? Each time I click on the button, either the size of the button or the font size changes. Note: I cannot lock my sheet as my Macro will write into the sheet. Autosize is turned off. I run Excel 2007 on Windows 7 (64 Bit). 回答1: I use the following for ListBoxes. Same principle for buttons; adapt as appropriate. Private Sub myButton_Click() Dim lb As MSForms.ListBox Set lb = Sheet1.myListBox Dim oldSize As ListBoxSizeType oldSize = GetListBoxSize(lb) ' Do

Resizing numpy.memmap arrays

时光毁灭记忆、已成空白 提交于 2020-01-01 01:15:48
问题 I'm working with a bunch of large numpy arrays, and as these started to chew up too much memory lately, I wanted to replace them with numpy.memmap instances. The problem is, now and then I have to resize the arrays, and I'd preferably do that inplace. This worked quite well with ordinary arrays, but trying that on memmaps complains, that the data might be shared, and even disabling the refcheck does not help. a = np.arange(10) a.resize(20) a >>> array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0