It would be great if anyone could provide a tutorial or best approach to create a dynamic speech bubble in iphone. Here is the link of an application that already has a dynamic speech bubble built in - http://itunes.apple.com/us/app/bubble-up-free/id364054415?mt=8 . Since I am starting to develop applications in xcode I am not sure whether to approach this using quartz 2d or open GL etc.
http://www.uinnoblog.com/sms-bubble-ui-in-iphone-apps.html
The previous approach is not really the good one where you can use only one image and use the advantage of the stretchableImageWithLeftCapWidth / topCapHeight according with a setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin of an UIImage allowing to stretch an image by its width and/or height without stretching all angles...
In that case, your speech bubble image will be smaller, you'll need only one (instead of 9) AND your code will be really smaller...
Here is good cocoa UI Component on GitHub: https://github.com/AlexBarinov/UIBubbleTableView
Related
I want to create a 2D sprite that mimic the provided image:
http://a4.mzstatic.com/us/r1000/069/Purple2/v4/e6/0d/73/e60d73a8-6d78-64c2-dd59-9aabb54c7837/mzl.ujapwanw.320x480-75.jpg
and create different face expressions as provided sprites to unity3d in order to create an android application has multiple face expressions with those sprites... so my question... is what exactly the software I might use through out this process ??
Please, let me know the simplest step-by-step procedures, as I am in my first steps in computer graphics.
Thanks a lot.
Image manipulation is what you are looking for. To modify the current image you have and generate other facial expressions from it, you need to be very good at math. Image manipulation is not a basic stuff and I hope you are not new to programming.
Now that you understand that, you need OpenCV to be able to do this. You need to make a wrapper for it in c#. You can get the already made wrapper [here].1 https://www.assetstore.unity3d.com/en/#!/content/21088 .It works on Windows,Mac, Android and iOS and will save you time. Its NOT free but the price is worth it compare to the time you will spend building the wrappers for all platforms.
Once you get this, you can start learning OpenCV from the following link.
http://docs.opencv.org/doc/tutorials/tutorials.html
http://opencv-srf.blogspot.com/
http://shervinemami.info/openCV.html
http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html
If you the Unity plugin I mentioned, you can ask the author of the plugin to help you out if you are tuck.
I'm looking for an example of multi-threading implementation inside the game toolkit? I have the MultiCube example, but that is for WinForms and I use WPF, and I can't use the game toolkit tools from Direc3D11 because I need an instance of the GraphicsDevice. The MultiCube example is not displaying anything but a black screen, I tried it on several computers. My video card doesn't support command lists, don't know if that has anything to do with it. I was wondering how many models can SharpDX handle, because I have to draw hundreds of small
scaffold couplers, and after adding about a 100 on the default GraphicsDevice, the application slows down and gets locked. Any help would be appreciated.
Regards,
Haris
I was looking for the same thing but I couldn't find any examples. I tried converting the MultiCube example to use the toolkit and got it basically working, still very messy at the moment and needs optimizing, but at least it renders.
https://github.com/PlehXP/SharpDX-Samples/tree/MultiCubeToolkit/Toolkit/WindowsDesktop/MultiCube
How does one do image processing & manipulation in an iPhone application?
I would like to include below 3 important steps:
access raw RGB from image data
apply any image processing (edge detect, grey-scale, contrast & color).
create a new image from this modified data.
I got few links with color & contrast, but still looking for edge detection just from the corners of the image.
Here are the links:
https://launchpad.net/imagemagick/main/6.3.2-2
http://code.google.com/p/image-tools2009/source/checkout
http://www.google.com/codesearch#I0cABDTB4TA/pub/FreeBSD/
Is there any other open source code available for these functionalities?
Your question highlights open source frameworks - but I'm going to throw my answer behind Apple's CoreImage framework that is now available in iOS5. CI has been around as an OSX framework for a very long time and as of iOS 5+ you can use a subset of the filters in iOS.
Advantages include:
Very powerful
Highly Optimised
Been around for ages
Ray Wenderlich has great tutorials and he has one on "Beginning Core Image in OS5" which I think might be right up your alley. He talks of the fundamental parts like CIContext, CIImage, CIFilter.
The second place you should look is the Core Image Programming guide for iOS and then CoreImage Filter Reference from Apple. The filter reference mentions which filters are available in iOS.
If you're finding that all a bit difficult, I think you may need to step backwards into CoreGraphics to learn the underlying basics of graphics on iOS - but that's outside the scope of this question.
I want to build a program that will (as part of what it's doing) display lines organically growing and interacting horizontally across the screen. Here's a sample image, just imagine the lines sprouting from the left and growing to the right:
The lines would look like the lines used on Google Maps Transit Overlay or OnNYTurf's transit pages.
It's a personal project, so I'm open to just about any language and library combination. But I don't know where to start. What have you used in the past to create graphics that are similar to this? What would you recommend? I want it to run on Windows without any extras needed (.Net is fine), and it doesn't have to run elsewhere. I needs to run as an actual program, not javascript in the browser.
There's obviously no 'right' answer to this, but the purpose isn't to start an argument about X better than Y but rather just find a list of graphics toolkits that do simple 2D graphics that people recommend because of their ease of use or community or whatever.
Processing may be just the tool for you.
Like you said, there are many ways to tackle this problem. Me personally, being it is a windows based project, I would go with the .NET based implementation utilizing WPF. There are tutorials on how to use the 2D drawing feature out there ( http://www.wpftutorial.net/DrawOnPhysicalDevicePixels.html for one ) Again, there is no right answer here. I might also pick some new technology and let your project be a mechanism to learn something new, providing you do not have a looming deadline.
I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is required.) I would like the users interactions on the screen to be quick and responsive (pending my ability to write fast algorithms.)
Ideally, I would like to write this in Python, or perhaps Java as a second choice. The ability to easily make the final app cross-platform is a must. I will submit to different API's on different OS'es if necessary as long as I can write an abstraction layer around them. Any ideas?
addendum: I need the ability to draw on-screen. Drawing out to a file I've got figured out.
I just this week put together some slides and demo code for doing 2d graphics using OpenGL from python using the library pyglet. Here's a representative post: Pyglet week 2, better vertex throughput (or 3D stuff using the same basic ideas)
It is very fast (relatively speaking, for python) I have managed to get around 1,000 independently positioned and oriented objects moving around the screen, each with about 50 vertices.
It is very portable, all the code I have written in this environment works on windows and Linux and mac (and even obscure environments like Pypy) without me ever having to think about it.
Some of these posts are very old, with broken links between them. You should be able to find all the relevant posts using the 'graphics' tag.
The Pyglet library for Python might suit your needs. It lets you use OpenGL, a cross-platform graphics API. You can disable anti-aliasing and capture regions of the screen to a buffer or a file. In addition, you can use its event handling, resource loading, and image manipulation systems. You can probably also tie it into PIL (Python Image Library), and definitely Cairo, a popular cross-platform vector graphics library.
I mention Pyglet instead of pure PyOpenGL because Pyglet handles a lot of ugly OpenGL stuff transparently with no effort on your part.
A friend and I are currently working on a drawing program using Pyglet. There are a few quirks - for example, OpenGL is always double buffered on OS X, so we have to draw everything twice, once for the current frame and again for the other frame, since they are flipped whenever the display refreshes. You can look at our current progress in this subversion repository. (Splatterboard.py in trunk is the file you'll want to run.) If you're not up on using svn, I would be happy to email you a .zip of the latest source. Feel free to steal code if you look into it.
If language choice is open, a Flash file created with Haxe might have a place. Haxe is free, and a full, dynamic programming language. Then there's the related Neko, a virtual machine (like Java's, Ruby's, Parrot...) to run on Mac, Windows and Linux. Being in some ways a new improved form of Flash, naturally it can draw stuff. http://haxe.org/
QT's Canvas an QPainter are very good for this job if you'd like to use C++. and it is cross platform.
There is a python binding for QT but I've never used it.
As for Java, using SWT, pixel level manipulation of a canvas is somewhat difficult and slow so I would not recommend it. On the other hand Swing's Canvas is pretty good and responsive. I've never used the AWT option but you probably don't want to go there.
I would recommend wxPython
It's beautifully cross platform and you can get per pixel control and if you change your mind about that you can use it with libraries such as pyglet or agg.
You can find some useful examples for just what you are trying to do in the docs and demos download.