[Solved] take picture automatic , without user interaction in android [closed]

You can use an approach like this private Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { @Override public void onPictureTaken(final byte[] bytes,final Camera camera) { // Do something here … save, display … } }; public void takePictureBack(ControllerState state){ Camera camera = null; int cameraCount = Camera.getNumberOfCameras(); for (int cameraId = 0; cameraId < cameraCount; cameraId++) { … Read more

[Solved] switching between pictures randomally [closed]

I made you a page that switches between two images in a random manner. You can easily expand this, by adding image urls to the images array <!DOCTYPE html> <html> <head> <script type=”text/javascript”> var p = { onload: function() { setInterval(p.switchImage, 10000); }, switchImage: function() { document.getElementById(“image”).src = p.images[Math.floor(Math.random() * p.images.length)]; }, images: [“http://www.schoolplaten.com/afbeelding-hond-tt20990.jpg”, “http://www.schoolplaten.com/afbeelding-hond-tt19753.jpg”] … Read more

[Solved] Xcode: Set a button background image to change everytime the button is pressed

Follow this sample logic .This may be useful for you. -(void)viewDidLoad{ isCount = 0; // int value. UIImage * image1 = [UIImage imageNamed:@”SampleImage1.png”]; UIImage * image2 = [UIImage imageNamed:@”SampleImage2.png”]; UIImage * image3 = [UIImage imageNamed:@”SampleImage3.png”]; UIImage * image4 = [UIImage imageNamed:@”SampleImage4..png”]; UIImage * image5 = [UIImage imageNamed:@”SampleImage5.png”]; UIImage * image6 = [UIImage imageNamed:@”SampleImage6.png”]; UIImage * … Read more

[Solved] How to change RGB values in c++ [closed]

I feel like this question’s potential was ignored because of the irrelevant snippet of code and the misleading opening and reading text file part. You can replace change and replace RGB values in bitmaps with HBITMAP in windows.h(MFC) The Solution: HBITMAP hBmp; CCloneBitmap bmpClone; HICON hIcon; hBmp=LoadBitmap(AfxGetResourceHandle(),MAKEINTRESOURCE(ID_LIGHTCAR)); if(hBmp!=NULL) { bmpClone.Clone(hBmp); DeleteObject(hBmp); bmpClone.ChangeColor(IRGB(0,0,0), IRGB(255,0,0)); // change … Read more

[Solved] Passing coordinates values from google sheets columns in static map URL

I think you had Lat, long wrong way around. Some mapping systems require Lat, Lng and others Lng, Lat (go figure!) If you change as below, you will get an image, but you may need to play with other parameters to get it working as you need. =IMAGE(“https://api.mapbox.com/styles/v1/mapbox/streets-v10/static/”&K3&”,”&J3&”,14.25,0,60/600×600?access_token=API_KEY”) You can also use the form below … Read more

[Solved] How draw bounding box on Specfic Area using Opencv python? [closed]

Here is my Python/OpenCV code. I can get the region by a judicious choice of area thresholding. But this is not likely going to be robust for other images. Input: import cv2 import numpy as np # read image img = cv2.imread(“younas.jpg”) # convert img to grayscale gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # median filter gray … Read more

[Solved] What really is a PNG? [closed]

Standard PNGs don’t support editing. Simplifying it a bit, they are just what you said they are: losslessly compressed bitmaps (vs JPGs, which employ lossy compression, or GIFs which are also bitmaps, but only support up to a 256 color palette). Fireworks PNGs contain a special header and extra data that allows them to retain … Read more

[Solved] Making and drawing an image C#? [closed]

You could use GDI+ (and more specifically the Graphics class): // Load an existing image into a Graphics object using (var image = Image.FromFile(@”c:\work\input.png”)) using (var gfx = Graphics.FromImage(image)) { // Draw a line on this image from (0x0) to (50×50) gfx.DrawLine(new Pen(Color.Red), 0, 0, 50, 50); // save the resulting Graphics object to a … Read more

[Solved] android: how to using image in asset folder in html to load in webview [duplicate]

Try this way its working for me public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String sHtmlTemplate = “<html><head></head><body><img src=\”file:///android_asset/ic_launcher.png\”><p>Hello Webview.</p></body></html>”; WebView wb = new WebView(this); wb.loadDataWithBaseURL(null, sHtmlTemplate, “text/html”, “utf-8”,null); setContentView(wb); } } Output: 2 solved android: how to using image in asset folder in html to load in … Read more

[Solved] NetworkOnMainThread Error

http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html. NetworkOnMainThread occurs because you might me doing netowrk related operation on the main UI Thread. You have to make network related operation in the background thread and updata ui on the ui thread. You can use a asycntask. http://developer.android.com/reference/android/os/AsyncTask.html class TheTask extends AsyncTask<Void,Void,Void> { protected void onPreExecute() { super.onPreExecute(); //display progressdialog. } protected void … Read more

[Solved] Stock images for web design [closed]

You are right that stock photos are a waste of money if you are building for personal projects, but there are plenty of free stock photo websites: http://deathtothestockphoto.com/ is a good choice Buy a template from websites like themeforest or wrapbootstrap (google them) or the free templates on bootstrap’s website: http://startbootstrap.com/. Start making things and … Read more