w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Drawing signature in ipad app and convert it in image
This SO topic has exactly the same problem (Drawing and saving of a signature on iOS): iOS: How to convert the self-drawn content of an UIView to an image (widespread general solution returns blank image)? Please try and mark your question solved, if it helps.

Categories : Iphone

How to convert an SQL Server BLOB string to System.Drawing.Image?
The issue is that the conversion between the hex-encoded string to byte array isn't being done property. The code you listed will treat each of the chars in the blob as a byte, so an 'F' will be treated as 0x46 (the ascii code for a capital F). What you want to do is de-code each 2 characters as a single byte - i.e. F0 = 240 etc. It assumes the string is an even number of characters. You'll also need to strip off the '0x' prefix, as that's just an indicator that what follows is a hexadecimal representation of the data. So instead of this: strPhoto = csvuser.photo; // The string that represents the BLOB byte[] bytes = new byte[strPhoto.Length * sizeof(char)]; System.Buffer.BlockCopy(strPhoto.ToCharArray(), 0, bytes, 0, bytes.Length); Do something like this (adapted from previous answe

Categories : C#

PDF Signature gets rotated when e-mailing from iPad
In a nutshell The e-mailed PDF is based on the uploaded PDF. The change is that the original document (the uploaded PDF) contains two annotations which in the changed document (the e-mailed PDF) have been flattened, i.e. stored in the page content instead. Unfortunately the software doing that flattening simply appended commands for showing the annotation appearances to the page content ignoring the fact that the transformation matrix has been changed (rotated) in the already existing page content. Thus, the signatures are rotated, too, after form flattening. Thus, the software doing this form flattening has to be repaired (simply appending to the content without considering that the transformation matrix might have been changed actually is a no-go!). As a short term solution, though,

Categories : IOS

How to convert from iPAD/iPAD2 layout to iPhone4/iPhone5/iPAD-mini layout
when you started building this app you should have done soemthing like this: view.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth; and you change above options according to your needs. and yes you would need different for ipad, iphone

Categories : Iphone

Convert 3D drawing to 2D drawing In Autocad Using C#
AutoCAD Express Tools has a method called "Flatten" that is supposed to handle this. However anyone who has actually used it knows it doesn't always get the job done. This is certainly feasible, and you can use the in-process AutoCAD libraries natively in C# to walk through the entities. (AcMdg.dll, AcDbMdg.dll) I would approach this by entity type. Each entity handles the z-axis differently in AutoCAD, so I'd group them into buckets beforehand and deal with them in batches. Lines are easy, as you can change the z-axis on the start and end points to 0, and polylines have an elevation if I remember correctly. 3D polylines will need each vertex walked through and set individually. Circles can have the center point set directly to z = 0... you see what I'm getting at. Go through the

Categories : C#

Drawing an outer shadow when drawing an image
Here we go Yup I still dig the Nexus S First of all, please stop masking bitmaps that way, you can accomplish this without allocating another Bitmap, checkout this blog post about how to draw rounded (and actually any shape) images. Second using that Drawable you probably can figure out how to add your shadow, just make sure it does not get clipped, on 18+ you could use ViewOverlays for that, also keep in mind that there are several unsupported drawing operations for hardware accelerated layers, that includes setShadowLayer and BlurMaskFilter, if performance is not an issue for you, you can disable it as always: if (SDK_INT >= HONEYCOMB) { view.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } And use setShadowLayer as you were trying already: somePaint.setShadowLayer(shadowSize

Categories : Android

What's the best way to convert iPad app to handle both view modes?
If it is controlled mathematically, the best way is to refer all coordinates to the dimensions of the parent view, specifically to the property self.view.bounds that changes with the rotation of the device. Then you have to redraw the interface when the orientation has been changed. A good way to do it is inside the method: -(void)viewWillLayoutSubviews If did some custom views in the past with CG methods and the best way is to refer everything to the bounds. In that way when you change the screen size, either by rotating or by using it on the iPhone it works without modifications. update Imagine that you have a point at (76.8, 512.0) this is precisely in an iPad and portrait orientation, a 10% of the width and a 50% of the height. So for every pair of coordinates instead of using th

Categories : Objective C

Android Imageview is drawing new image over previous image
You can do this with the following, just before you set the second drawable. telephoneImageView.setImageResource(0); I have not tried the above, but if it doesn't work also try: telephoneImageView.setImageResource(android.R.color.transparent); Also try specifying the imageview as invisible, then set it back to visible again. This might trigger a redraw. You could also try a combination of the above and maybe try telephoneImageView.invalidate().

Categories : Android

How to drawing on screen and convert it to character?
You will have to keep noting the locations of touch when the user is drawing. That is note it from touch-down event to the touch-up event. Then, you'll have to iterate through the points and understand the pattern. The approach to understand the drawing patterns for letters/characters is known as OCR. OCR = Optical Character Recognition. You'll have to either write your own OCR code or search for some readily available OCR from internet. I hope you get the direction.. :)

Categories : IOS

Convert System.Drawing.Printing.PrintDocument to PDF c#
How about installing a virtual PDF printer and "print" the document? For example - http://www.dopdf.com/, or http://www.cutepdf.com/products/cutepdf/writer.asp? A code sample of how to print a PrintDocument, can be found here http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx Another possible course would be take the Graphics from the PrintDocument (http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage(v=vs.80).aspx and look at what is proposed here - http://www.websupergoo.com/helppdfnet/source/4-examples/20-systemdrawing.htm

Categories : C#

Convert a decimal value in system.drawing.point
You can use the PointF Structure. From above link: Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane. i.e. Dim datok As Decimal Dim datol As Decimal Dim myPoint As PointF = New PointF(datok, datol) I am not sure how you are drawing your lines, but there are corresponding Graphics Methods the use the PointF Structure instead of Point as in this DrawLine Method Or if you are content to have some data loss you can just convert the decimals to integers when you create your Point i.e. Dim myPoint As Point = New Point(CInt(datok), CInt(datol))

Categories : Visual Studio 2010

Upload Image to Amazon S3 (How to get Signature and Policy Doc)
I had this same issue a while ago while working with Cordova. This is a helpful link that helped me make my Python Script that generates a policy and signature. I hope it's helpful! Generating Amazon S3 CORS signature with Python

Categories : Jquery

How to do signature using stylus and save it as image in Android?
I have seen this link.Don't know this the exactly the one which you wantPlease visit this and hope this helps.

Categories : Android

How do I save the captured image of a signature to MySQL
submit image data that you get from your canvas using AJAX: $.ajax(url, { type: "POST", data: canvas.toDataURL("image/png"), success: function (data, status, jqxhr) {...}, error: function (jqxhr, status, error) {...} });

Categories : Javascript

(Gmail) Sending emails from spreadsheet. How to add signature with image?
Currently the API does not offer anything to include the signature to messages, however, if you have control of the signature, you can use the method sendEmail(recipient, subject, body, options) available in classes GmailApp/MailApp. The options parameter allows you to set additional parameters to get what you need, for example, include images, with which the signature can build manually, and sets text in bold. I invite you to take a look at the documentation/examples and post any questions you may have. An interesting example can be found here.

Categories : Google Apps Script

how to put an image into UIImagePickerController on the iPad
add this code UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) like this -(UIImage*)captureScreen:(UIView*) viewToCapture{ UIGraphicsBeginImageContext(viewToCapture.bounds.size); [viewToCapture.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); imageView.image = viewImage; UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); [self dismissViewControllerAnimated:YES completion:NULL]; [self performSelector:@selector(call) withObject:nil afterDelay:.3]; } -(void)call { if ([popoverController isPopoverVisible]) { // if yes - remove [popoverController dismissPopoverAnimated:YES]; } else { // create an

Categories : Iphone

Unable to tap on image in an ipad app
To answer your question, no, you cannot tap on an element that is not visible. similar question

Categories : Javascript

Generics method signature and standard signature identical
Sorry, there is not. The simplest solution is to use two different method names to indicate the difference in behaviour. Since the method names in question are constructors, you have no control over the names, so you must change at least one of them into a normal method instead. For example: public class Generics<T> { public T Member; public String ErrorMessage; public Generics(T member) { this.Member = member; } private Generics() { // empty constructor just to allow the class to create itself internally } public static Generics<T> FromError(String errorMessage) { return new Generics<T> { ErrorMessage = errorMessage }; } } Personally I would change both constructors to be static methods, so that

Categories : C#

Python HMAC-SHA256 signature differs from PHP signature
In case you're still stuck on that question, you might want to try using: sign_signature = base64.b64encode(hmac.new(secret_key, sign_payload, hashlib.sha256).hexdigest()) The key here is to use hexdigest() instead of digest(). In my case I lost 2 hours finding out why Python did not produce the same result as PHP did when trying to sign Facebook API requests with their new "app secret proof".

Categories : Python

how to set Image for UIBarButton item in ipad
Try it in this way: UIImage *image = [UIImage imageNamed:@"facebook.png"]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.bounds = CGRectMake( 0, 0, image.size.width, image.size.height); [btn setImage:image forState:UIControlStateNormal]; [btn addTarget:self action:@selector(loginPressed) forControlEvents:UIControlEventTouchDragInside]; UIBarButtonItem *rbBtn = [[UIBarButtonItem alloc] initWithCustomView:btn]; self.navigationItem.rightBarButtonItem = rbBtn;

Categories : IOS

Pan Zoomed Image on Ipad using Javascript
I managed to work this out. Should anyone need something like this in the future. The code is attached below. var orig = e.originalEvent; if(e.type == 'touchstart'){ if(orig.touches.length == 1){ touches = 1; origX = orig.targetTouches[0].pageX; origY = orig.targetTouches[0].pageY; }else if(orig.touches.length == 2){ touches = 2; } }else if(e.type == 'touchmove'){ e.preventDefault(); if(touches == 1){ /*=================================================* Detect Single Touch and pan around image accordingly *=================================================*/ width = $zoomImg.width(); height = $zoomImg.height(); if(width> originalWidth || height> originalHeight){ e.stopPropagation(); var del

Categories : Jquery

Drawing over an image in image view
You are trying the wrong approach. To draw lines like that you will need to draw on a canvas. You receive such a canvas in an onDraw method. This means that instead of using a stock ImageView you need to create your own View, override its onDraw method to draw your image and then draw any "lines following the finger over the image". If you want more than the latest line to be visible then you will also need to save those to a canvas that you create so that you will have your onDraw do the following: Draw your original image Draw the canvas containing the old lines Draw the current line. Given that you will be using your own view you won't use an onTouchListener() but instead override the view's onTouchEvent(MotionEvent event). Looke into Google's API demos Graphics->Fingerpaint (imp

Categories : Android

Javascript image loading slow on ipad
This page says that iPad cuts off loading images at 6.5mb. I'm not sure if this is still true but I've definitely noticed throttling before 6.5 mb. Since I'm using a photo scroller, what I've done is load the image names in a hidden html field and then load the next image in a hidden image tag 2.5 seconds before the scroller displays the next image. Of course, you could also load the image names in a JavaScript array. I can provide code snippet if still interested...

Categories : Javascript

How to Change the Image of Cell Selected in ipad app
use in didSelectRowAtIndexPath: RootCell *cell = (RootCell *)[self.tableView cellForRowAtIndexPath: indexPath]; cell.cellImageView.image=[UIImage imageNamed:@"selectedImage.png"];

Categories : Objective C

Loading image on ipad will not display using ajax
try the following: $(document).ready(function (e) { $('#loading').hide().ajaxStart(function () { $(this).show(); }) .ajaxStop(function (e) { $(this).hide(); }); });

Categories : Jquery

Repeat background image horizontally on iPad
Looks like a common issue that might be fixed by setting a min-width on the HTML element. See http://stackoverflow.com/a/12242229/2765713 Feels like a bit of a hack though, will need thorough testing cross browser/device.

Categories : CSS

Ipad website image performance and memory
I just runned this test on my iPad Safari. And looks like CSS is faster. Try it yourself on you iPad. 3 tests: Image tag src: img.onload = loadHandler; img.src = getUrl(); CSS Background bg.style.background = "url('" + getUrl() + "') no-repeat"; Image tag src without onLoad img.onload = null; img.src = getUrl(); Here I got the following result: Image tag src: 5,369 Operations/Sec. CSS background-image: 19,554 Op/S. Image Tag Src (without OnLoad): 2,757 Op/S. BTW, this test was not created by me. Edit: As pointed to me, I did a new test to test the performance in another way. To be more consistent, I tried to see each solution in a different way. I used the following code. var count = 1; function add(){ var p = document.getElementById("parent"); if (false){ var d

Categories : Javascript

draggable background image not displaying on ipad
How big is your image? Mobile Safari has a suggested limit of 1024x1024 for images for memory considerations, and I've had it act unpredictably when going over that size. I suggest trying a smaller image for mobile/tablets. See: Image size limitations in mobile safari? Edit: I just saw it is 3609x2105 pixels. Try a smaller version

Categories : Javascript

Drawing on an Image
Painting is a destructive process. That is, each time paintComponent is called, you are expected to repaint what ever it is you need to displayed the screen, entirely from scratch. There are (at least) two immediate issues with your approach You are not calling super.paintComponent, this will effect the way in which the paint process updates the screen, this VERY important as you have extended from JComponent which is transparent by default and may compromise the ability for the framework to function correctly (leaving nasty paint artifacts all over the place) - also remember, Graphics is a shared resource. All the other components that are to be painted will share this resource, meaning that you could end up with what ever was painted before you being left on the screen. You are re-l

Categories : Java

Table View Cell Image Stretching in ipad
Try this UIImageView *imgV = [[UIImageView alloc] initWithImage:[ [UIImage imageNamed:@"1.png"]; imgV.contentMode = UIViewContentModeScaleAspectFit; cell.backgroundView = imgV; AspectFit and some more modes are there. I am not sure whether it will work for cell back groundView. Just give a try.

Categories : Iphone

Scaling an image is slow on an iPad 4th gen, are there faster alternatives?
If you want this to perform well, you should let the GPU do the heavy lifting by using CoreAnimation instead of drawing the image in your -drawRect: method. Try creating a view and doing: myView.layer.contents = self.image.CGImage; Then zoom and translate it by manipulating the UIView relative to its superview. If you draw the image in -drawRect: you're making it do the hard work of blitting the image for every frame. Doing it via CoreAnimation only blits once, and then subsequently lets the GPU zoom and translate the layer.

Categories : IOS

CSS Background Image Specific Rule for iPad and iPhone
You'll need to add a separate stylesheet and add it if the user agent string matches an iPhone or iPad. IS_IPAD = navigator.userAgent.match(/iPad/i) != null; IS_IPHONE = (navigator.userAgent.match(/iPhone/i) != null) || (navigator.userAgent.match(/iPod/i) != null); if (IS_IPAD) { IS_IPHONE = false; }

Categories : HTML

Drawing Text On Image c#
I am sure you might be looking for this. rectf = new RectangleF(655, 460, 535, 90); //rectf for My Text using(Graphics g = Graphics.FromImage(myBitmap)) { //g.DrawRectangle(new Pen(Color.Red, 2), 655, 460, 535, 90); g.SmoothingMode = SmoothingMode.AntiAlias; g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.PixelOffsetMode = PixelOffsetMode.HighQuality; StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Center; g.DrawString("My Text", new System.Drawing.Font("Thaoma", 32, FontStyle.Bold), Brushes.Black, rectf, sf); } //g.DrawRectangle(new Pen(Color.Red, 2), 655, 460, 535, 90); Line is used to show where your text will be written. So before you actually make your make your text You

Categories : C#

LibGDX not drawing image? [OS X]
This link shows a simple setup for rendering a graphic. When you initialize the Texture splashTexture, usually with libGDX you keep the assets in an assets folder named "data." Try initializing it to: Texture splashTexture = new Texture(Gdx.files.internal("data/intrologo.png")); You need to call the draw method on the batch, and pass the texture to it along with an x and a y coordinate to draw the texture to. batch.begin(); batch.draw(splashTexture, 50, 100); batch.end(); Play with the x and y coordinates to taste.

Categories : Java

on ipad stop page movement on Image slider swipe
Sliders don't work when the dragging action is needed to move the page around. You can prevent this by disabling the ability to zoom in. Use the iOS-specific meta tags for this. <meta name="viewport" content ="width = device-width, user-scalable = no"> The documentation for this is here.

Categories : Jquery

How to convert image in to binary image using Image processing with Emgu CV
You can transform image into binary by converting it to grayscale and then apllying threshold after that: var bwImage = colorImg.Convert<Gray, byte>().ThresholdBinary(new Gray(yourThrehold), new Gray(255)); if you have small blobs (salt and pepper noise) you can use median filter -function Median or erode the image (function Erode and that dilating it - funcrtion Dilate)

Categories : C#

ubuntu - using imagemagick convert utlity to convert image into a multipage pdf
you can crop each image into sections and then put it back together like this. the dimensions are the size it will crop each part of the page into. convert aaaaaaaaa.png -crop 943x1360 +repage multipage.pdf

Categories : Ubuntu

Drawing Image in Canvas using DataURL
youre missing the onload event of the image: var image = new Image image.src = "URL or DataURL" image.onload = function(){ ctx.drawImage(image) } working fiddle

Categories : Javascript

Canvas not drawing image from spritesheet
ctxEnemy.drawImage(spriteImage,this.srcX,this.srcY,this.playerWidth,this.playerHeight,this. drawX,this.drawY,this.playerWidth,this.playerHeight); Your Enemy object don't have playerWidth and playerHeight properties. You really may want to model them with the same constructors to avoid such confusions.

Categories : Javascript

drawing rectangle in an image in OpenCV
the two corners of your rectangle will be displaced say 1 pixel above and below the location of the max pixel. so cvRectangle(img, minLoc+cvPoint(- 1,- 1), minLoc+cvPoint(1,1), 255, 2) will draw a rectangle 1px araound the point, with the rect having a border thickness of 2px Yes, If the other parameters are not specified, they default to their values 1,8,0

Categories : C



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.