image-manipulation

guassian smoothening formula application

守給你的承諾、 提交于 2020-01-12 23:13:59
问题 How to apply guassian smoothening formula for a graph which is in array? these array are mapped to a color and plotted on the graph. i want the linear gradient of color after applying guassian smoothening.. I want to know the exact guassian smoothening formula too. 回答1: I believe what you're asking for is typically called a "Gaussian blur" in photo-editing applications. It is simply the result of blurring an image using a Gaussian function, resulting in a reduction of visual noise and detail.

C# image whitespace

喜欢而已 提交于 2020-01-12 07:07:19
问题 I have an image that is 240x320 (iphone camera image in portrait), and I need to programmatically (in C#) add white "bars" to the sides increasing the full image size to 320x320. I don't want to scale the image because that would mess up the aspect ratio. I have found a lot of info about how to remove white bars with c#, but nothing about how to add them. I am at a loss. Does anyone have any input that might lead me the correct direction? Thanks a bunch, Brett 回答1: using (System.Drawing.Image

How to draw or plot a mesh using the mouse in JavaFX which can then be textured and deformed?

China☆狼群 提交于 2020-01-11 06:16:08
问题 I am trying to implement a tool into my application. the tool would allow the user to plot a triangle meshes using the mouse. I have looked everywhere for a way to do this, tutorials, examples, etc and have not been successful. I have seen the FXyz library but that does not really simulate What I am trying to accomplish. The goal of the program looks as follows: Use Case Sequence: The user adds a png image to the 3D scene or drags it into the 3D scene using the mouse. Once the image is being

XSLT: Obtaining or matching hashes for base64 encoded data

扶醉桌前 提交于 2020-01-10 09:22:24
问题 I need to find a way to find a way to find the hash for the base64 encoded data in the XML node //note/resource/data , or somehow otherwise match it to the hash value in the node //note/content/en-note//en-media@hash See below for the full XML file Please suggest a way to {obtain|match} using XSLT 4aaafc3e14314027bb1d89cf7d59a06c {from|with} R0lGODlhEAAQAPMAMcDAwP/crv/erbigfVdLOyslHQAAAAECAwECAwECAwECAwECAwECAwECAwEC AwECAyH/C01TT0ZGSUNFOS4wGAAAAAxtc09QTVNPRkZJQ0U5LjAHgfNAGQAh/wtNU09GRklDRTku

XSLT: Obtaining or matching hashes for base64 encoded data

吃可爱长大的小学妹 提交于 2020-01-10 09:21:38
问题 I need to find a way to find a way to find the hash for the base64 encoded data in the XML node //note/resource/data , or somehow otherwise match it to the hash value in the node //note/content/en-note//en-media@hash See below for the full XML file Please suggest a way to {obtain|match} using XSLT 4aaafc3e14314027bb1d89cf7d59a06c {from|with} R0lGODlhEAAQAPMAMcDAwP/crv/erbigfVdLOyslHQAAAAECAwECAwECAwECAwECAwECAwECAwEC AwECAyH/C01TT0ZGSUNFOS4wGAAAAAxtc09QTVNPRkZJQ0U5LjAHgfNAGQAh/wtNU09GRklDRTku

PHP - Problem with ImageCopyResampled

青春壹個敷衍的年華 提交于 2020-01-04 14:35:42
问题 It's my first time using the function ImageCopyResampled. I just followed the code written in the PHP manual. There seemed to be no errors when I ran the code. The problem is my code just basically copies the original image and did not follow the dimensions as it was defined in the parameters passed in the function. Below is my code: public static function uploadFile($filename, $x_dimension, $y_dimension, $width, $height){ $file = DOCROOT . "uploads/temp/".$filename; $trgt_file = DOCROOT .

How to measure the pixel width of the string drawed over Drawing.Bitmap in .NET?

可紊 提交于 2020-01-04 02:47:11
问题 I am generating a .png image that contains a text dynamically written. I need to create the bitmap with the minimum width for file size reasons. How do I do this? 回答1: Use Graphics.MeasureString() to compute the width. 回答2: You can also use TextRenderer for slightly more accuracy. See this article for differences between this and Graphics.MeasureString : http://msdn.microsoft.com/en-us/magazine/cc751527.aspx 来源: https://stackoverflow.com/questions/2555739/how-to-measure-the-pixel-width-of-the

Get remote image dimensions

拈花ヽ惹草 提交于 2020-01-03 15:32:55
问题 Given a URL to an image (and not the image itself), what's the most efficient of getting it's dimensions? I would like to change the height and width attributes in the image tag ( <img> ) if it is greater than 200x200. However, if it's smaller than that, then I'd like to keep the size as it is. (I'm using ASP.NET/C#) 回答1: If you don't want to check the properties of the image by loading it first you can do it with javascript: <img src="image.jpg" onload="if( this.width > 200 ) this.width =

jQuery resize image before saving

拥有回忆 提交于 2020-01-03 04:16:11
问题 I am new to jQuery but im loving it! ive have a problem i cant get round as of yet. I am using http://www.zurb.com/playground/ajax_upload which i have got working using the following upload.php <? $time= time(); $uploaddir = 'users/'; //<-- Changed this to my directory for storing images $uploadfile = $uploaddir.$time.basename($_FILES['userfile']['name']); //<-- IMPORTANT if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo $uploaddir.$time.$_FILES['userfile']['name'];

Image scaling does not work when original image height & width is smaller the scaling height & width

落花浮王杯 提交于 2020-01-03 03:42:24
问题 I have got a problem when trying to scale an image. The problem presents itself when the image i am trying to scale (original) is smaller than the size i am trying to scale up to. For example, an image with the width of 850px and the height of 700px trying to be scaled up to 950px width and height. The image seems to be scaled properly but is beeing drawn wrong on my bitmap. The code to scale the image will follow. The width beeing sent into ScaleToFitInside is the width and height trying to