Maximum file size for sprites in Cocos2d [duplicate] - cocos2d-iphone

This question already has answers here:
What is the maximum texture size available on the iPad?
(3 answers)
Closed 8 years ago.
What's the maximum size a file can be for a sprite? I have a background for a level that's 9200x640 and when I try to load the page it's on, the app crashes. If this is an issue, what can I do to resolve it? If not, what should I do in order for it to work?

Depends on the device (usually 2048×2048 or 4096×4096). For large images like the one you are using, you really need to use tiled images. Ray Wenderlich has an example here:
http://www.raywenderlich.com/29458/how-to-make-a-tile-based-game-with-cocos2d-2-x

Related

Running GLSL Compute shader without a graphic context [duplicate]

This question already has answers here:
How to render offscreen on OpenGL? [duplicate]
(5 answers)
Creating OpenGL context without window
(1 answer)
Closed 5 years ago.
I'd like to write a GLSL compute shader that works like an OpenCL application. I'm a newbie in GPGPU so i don't even know if it is possible.
The problem is that i'd like to run that program without needing a graphic server, like X11 on Unix. Is there a way i can initialize a dummy glContext to run that program in any terminal, without needs of graphic environment?
The host application is written in C++, if it matters anything.

reading black and white pixels as an array from jpeg in c and c++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
im trying to learn how to read a jpeg image as an array of pixels in c++ or c. so far ive learned that i have to include a outside library such as libjpg.h.
ive been told that the jpeg is formated in a RGB structure where each pixel gives 3 values. is this true? and if so how would i read values for a purely black and white image?
the purpose of this question is that i am trying to assign a pointer to the top right corner of a white squre in a black picture.
if someone could show me how to read out the vaules that are given to me for this situation so i could assign this pointer i would be greatful.
Let's suppose you run with libjpeg. You'll allocate a buffer and then call jpeg_read_scanlines a sufficient number of times to get all of your decompressed image data into memory. You can read scanlines (rows) individually and reformat them as needed. If the image is grayscale, the RGB values will all be equal, so you can just read one of them.
Paul Bourke's site has some pretty good usage examples of libjpeg.

Plot graphs in OpencCV [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Drawing and Plotting graph in OpenCV
How can I plot a single row of an image using OpenCV? I found some libs like http://www.shervinemami.info/graphs.html, but are there any libs that use opencv2 library (cv:: functions, core-module and so on...)
Don't.
OpenCV is for reading and interpreting images.
Use a drawing library - or better still a graph-drawing library.
What platform are you on? Some cross-platform ones are here:
http://www.gnu.org/software/libxmi/libxmi.html
http://www.boutell.com/gd/
http://www.levien.com/libart/
Specifically for charts and graphs, see this question:
C++: Free easy way to draw graphs and charts?

Make graphics to glow/halo [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to add glowing effect to a line for OpenGL?
I would like to get help for making my graphics glow. I would like to do it the same way as in Tron 2.0 game, without using advanced stuff like shaders etc. Mainly because my video card isn't capable.
I know I can get the technique from site: wanted outcome
But I don't know, how to do it in OpenGL in c++. Maybe somebody has code for doing it or step by step guide or can point me in direction where to obtain code or step by step guide for doing it. Let's say that my program draws a maze like in the picture below:
And now I would like to get that maze lines something like the picture below:
I have done exactly the same maze type of game, with glowing lines :)
The way we did it was to add rectangles around lines, with glow textures.
Sorry for not adding step-to-step tutorial, but at least you have the general idea there.

What are The opencv function useful for 2d skeleton estimation(ofRecursive centroids) [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Which is the best algorithm to “Estimate and Visulize 2d skeleton using Opencv” from the drawn contour
Opencv functions or stepts for 2d skeleton estimation
See http://opencv.willowgarage.com/documentation/cpp/index.html
I don't see anything for clustering/centroids, but you might try FindContours: http://opencv.willowgarage.com/documentation/cpp/structural_analysis_and_shape_descriptors.html#findcontours .
It sounds like you want to do visualization analysis and this library is more suited to machine vision.