Community Questions & Answers
toImage no working
I have tried the function toImage on android it doesn't work when I store the ~~~ var image = Ti.UI.createImageView({image: "path.png"}); var img = image.ToImage(); var toDisplay = Ti.UI.createImageView({image:...
toImage() for maps annotations on Alloy
Hey there. I'm trying to make a custom annotation image using a view and the toImage() method. However, I can't find a way to make it work properly. I'm trying to accomplish this with Alloy, SDK 3.0.2 and testing it on Android. Here's some...
Screenshot to gallery in Android
Hi there. I have read some post about the topic, where it seemed that you could use toBlob() instead of toImage, in android, but i haven´t figured it out. Here my thing, I have made a view into a scrollview and it can take screenshot of the whole screen...
I can't get toImage() callback to fire
Hi, I run Titanium Studio on Ubuntu 12.10 x64 with SDK-version 3.0.2 and I'm testing this on Android 4.2.2. I try to get an image of a view and I need to continue when I know that the image has been created. I get an image when running: ~~~ var image =...
Asynchronous toImage not responding
Hi, I have been using view.toImage() in the synchronous manner where I do not pass a callback function and it has been working fine. I am now trying to switch to the asynchronous usage and am having issues. Here is some example...
Calling toImage() on a view with crashes on Android. How else to you get width/height from an Image?
Is this expected, that toImage() on a view is not supported on Android? According to the API docs (that we all know are half-baked) I didn't see anything that would lead me to believe that you cannot. My attempts to get an image blob on a View or ImageView...
toImage() saving as GIF format
Hi All, I've read throughout the Q&A and found no solution. My question: Is it possible to save a view into GIF format via the toImage() method? I need to compress an image that is basically monochrome and I've read that GIF format uses only 256...
Nested views: wrong width on Android
I have the following code with nested views inside a scrollview. But when I try to access the width of the view_final I'll receive wrong numbers. ~~~ var win = Ti.UI.createWindow({ backgroundImage : "images/background_leather.png",...
toImage (from a map) as backgroundImage for a window
Hey there! I have a map view within a window and a button bar underneath that map view. One button opens a new modal window with options to manipulate the map. What I am trying to do right now is getting the current map as an image to give that modal...
Saving image @2x using toImage()
What I want to do is save a screenshot of a view as a @2x png People have mentioned that there has been a fix https://jira.appcelerator.org/browse/TIMOB-4884 but it still doesn't work for me. I am thinking it might be easier to do this by cropping a...
Label.toImage().width or height processing time
I am using toImage() to get the width or height of an auto sized label or component. I am using this repeatedly for like 50 labels in one screen to have a nice formated chat messages window ( kind of like the whatsapp window or viber when you are chatting...
view.toImage() no longer showing children
I have a function in my app that pulls an image from a secured server, places it in a view with several pieces of information, then uses the toImage() function to generate an image that I can safely post to Facebook without having to send a URL that...
[Android] Full contents of WebView to image
I have a basic image editor implementation inside a WebView. After the user finishes editing, I have to save the image. For this, I want to render the whole contents of the WebView as an image blob. When I use `toImage`, it returns only the viewable parts,...
Using toImage() on a View crashes in Android (SDK 1.6.1 and 1.6.2)
The following code works fine for the iPhone - it layers some labels on a view and then you can do a view.toImage(), save the blob data off to the temp directory and I have provided a sample email dialog to show the image being attached as one complete...
toBlob & toImage
plz if any 1 here know how to use this 2 function toBlob & toImage in the image views because i need know how to store some images in the database in a blob field and call it again to view it and plz if there an example or u have to try it...
ScreenShot entire webView?
I need a ScreenShot of entire webview, and not only of visible area. How can i do it? I try this, but not works.. :( ~~~ var screenShot = myWebView.toImage();; screenShot = screenShot.imageAsCropped({ height : 800, width : "100%", x : 0, y :...
row.toimage() issue
Platform: Android Version 1.8.2 I am using the following code to get the height of rows as i add them to set the height of the overall table. It works fine on the iPhone but not in android. Any idea? row.toImage().height
toImage() resolution
Hello! I have a view which dimensions are 250x250 px. I want to have an image of this view in it's native resolution, which is 500x500 because I am using a Retina display device. If I say view.toImage() the rendered image will not be retina sized. How can...
.toImage() and .takeScreenshot() are not capturing the visual state of object after transform
i'm using scrollarea with an image, which i'm applying 3d and 2d transformations/animations to. **problem**: when i'm trying to capture the image of the view using .toImage() or .takeScreenshot() after transitions have been applied, the resulting capture...
Creating high quality images with *.toImage() for iPhone 4
Hey everyone, I'm using toImage on a view and display that picture later on. The created image unfortunately is iPhone 3 size, so it looks pixelated on the Retina display. I couldn't find anything in the docs, but does someone know of a way to generate a...
Screenshot of webpage
Hi, I've tried a number of methods using blobs, toimage and webviews but have had no luck putting together a string of code that successfully takes a screenshot of an internet page when loaded in a window. Has anyone had any luck and could provide an...
toImage & imageAsCropped - Unexpected Results
I am trying to take a cropped screenshot on my iPhone app but it is giving me unexpected results. The screenshot comes out flipped (or reflected). Now the image that i am capturing in the window is a MaskedImage and this behaviour only exists with this...
toImage(), return a screenshot of a tableview largen than screen.
Hi, I use toImage() to get a screenshot of a tableview. The problem is that the tableview has more rows than are displayed on the screen. Is there a way to take a screenshot of the entire tableview?
Webview toImage()
Hi, I'm trying to create an Image from a Webview like so: ~~~ var webView = Ti.UI.createWebView({ width:200, height:100, html:'<div style="font-size:12; font-family=Helvetica">Hi...
Is it possible to to a toimage sort of thing on a remote(other process) window?
Im having trouble with the map/geo stuff..(kitchen sink just crashes on my device). I see on here that one can start an intent to get the android built in maps app to do it, however I do not see how one would snap the result as an image. Im refering to...
mapview .toImage not working for hybrid/satellite
Hi, I'm using a mapview and want to upload it as an image. So far so good ~~~ var theMap = mapview.toImage(); file = Titanium.Filesystem.createTempFile(Titanium.Filesystem.resourcesDirectory); file.write(theMap); // this is where the magic...
toImage() or takeScreenshot() videoPlayer
Hello I have a question, --- 'var activeMovie = Titanium.Media.createVideoPlayer({ url: contentURL, backgroundColor: '#111', fullscreen:true, movieControlMode:Titanium.Media.VIDEO_CONTROL_EMBEDDED, ...
How do I upload the contents of an ImageView to the server?
Can't seem to get this working, what am I doing wrong? (assume the ImageView was created inside the camera's success event) ~~~ var image = Titanium.UI.createImageView({ height:90, image:event.media, width:120 }); var xhr =...
WebView toImage() to ImageView is failing
On android with mobile sdk 1.6.1 I am was trying to find a way around not using images for gradients. So I came up with this solution: ~~~ var other = Ti.UI.createImageView({ top: 50, width: 100, height: 50, image:...
Problem in webview.toImage()
Hi, Can anyone tell why toimage method always return the image of previous view of webview? See the following code snippets. ~~~ function createHTMLString(price, tooltip, data){ var ymin = (data.ymin > 10) ? (data.ymin - 10) : data.ymin; ...
Influence the asynchronus toImage() behavior?
Hello, i am writing an app where i have to split large texts with paragraphs into labels that fit onto one screen. With paging you read the text, not with vertically scrolling. As I do not know how much text I can put on one screen, I put each paragraph...
Attach ImageView to an emailDialog
I'm having trouble getting an image to attach to an email. Everything thing seems to work perfectly and it the emailDialog even recognizes that it has an attachment, but the image doesn't show up. I"m not sure what's going on? Here's the...
iOS - 3d Transforms Not Respected When Converting A View/Window To Image
Hi All, When converting a window or view to an image, child objects that have had a 2d transformation applied will appear in the resulting image as expected (i.e. with the transformations preserved). However, the same is not true when performing 3d...
Get height of View
Hello, I want to get the height of the View. But toImage doesn't seems to work in Android. Has anyone a another solution? The View contains elements that doesn't have a fixed height. My stack trace says the following: > [TRACE] D/TiApplication(...
MAP.toImage() help
Ok so how do you use this function. I have tried different options and cant figure out how it works. If anyone has a working version of some code that they can share it would be most helpful.
Showing 1-35 of 35