Strangely worded but a rather potential strange situation.
I'm plotting on a canvas a massive number of lines, err points in some cases. This plotting goes beyond the edge of the screen...by the time all the data is included at a decent, usable resolution it would probably be in the area of 10,000-20,000x10,000-20,000 pixels...maybe bigger than that even. In the current situation where I'm only displaying maybe 1-2% of the data to the screen it takes 30 seconds to create the graph. I got to thinking this morning that maybe my best bet given how much more data is going to be presented before everything is said and done would be to create an initial graph and save the image and then display the image since it should be much quicker to display the image of the graph already created/saved then to create it each and every time I run the program.
I started doing some research into the idea this morning and have run into a few problems and questions to help me decide if this is a good idea or not.
When I try to
from PIL import Image, ImageTk
I get the error message that it cannot import ImageTk
If I try
import PIL
I get no errors. I'm using Linux and Python 3.4.3. Since several of the ideas involve ImageTk, how do I correct the importing problem?
Edit:
Also when I try
from PIL import ImageGrab
I get the error no module named _grabscreen. Since that falls under PIL shouldn't it have been installed with PIL?
I know I would still need to install pyscreenshot to try the one technique I've seen presented here on SO.
Do any of these methods save the full canvas or only what you see on the physical screen. I would be wanting to save everything which is a much larger image then the physical screen display?
After saving the image and bringing it back up would I still be able to scroll around the image with tkinter? As well, would I be able to add extras to the image, in terms of adding points of interest to the image(this would be a road map image).
So far I've only ever used tkinter for line graphs and not anything else so I don't have the experience to know the limitations versus what I might be wanting to do.
I have a few other ideas of how I might be able to handle the problem but none of the other ideas are as fast as this idea would be.
I just to need to get an idea as to what the limitations are to decide if I want to try to go any further with testing this idea out or not.
Thanks.
Related
So...
I plan on doing an animation that pulls all the text from the screen to the middle and lets it pulse like a heart. For that I checked if I'm able to manipulate whole Strings and Chars the way I'm able to manipulate circles, for example. I found the libraries Nexttext and Fontastic, but those seem to be outdated, therefore I can't use them with Processing 3.0. Than there is the library Geomerative, which I manged to install through Processings library manager, but this one yields the error "duplicate libraries", which I can't find a , for me understandable, workaround for. I'm also using minim, since I combine the pulse with music input, minim works fine though.
Thus I'm asking if anyone here has an idea on how to fix this error, make the outdated libraries run or maybe someone has an alternative way/library to manipulate text.
Apparently the processing forum is not that active, hence I'm asking here, there was one suggestions tho, that I should search for similar Java libraries, which I yet have to do.
What exactly do you mean when you say you want to pull text from the screen? Do you mean you want to get text from another application and copy it into Processing? Or are you just talking about doing something inside the Processing window?
If you're just talking about manipulating text within the Processing window, then I'm not sure why you need a library for this. Processing has several functions that allow you to draw text, change its font, size, positioning, etc.
Anyway, the issue you've encountered is a known bug. Looks like the only solution for now is to use an old version of Processing. You can download them from the same place you downloaded Processing 3.
Both Geomerative and Fontastic work with Processing 3.2.3
Bare in mind is the bug Kevin mentioned.
However, the only issue I had was compiling examples that had this line:
import processing.opengl.*;
Simply remove or comment this line and the example should compile
Im working and animating models on 3Ds max, but i need to import for example a horse to the poser to do more animating on characters face. please help me do that if everybody knows how to do it.
Poser is very restricted when it goes for importing and exporting rigged and animated objects. The best (and probably the only) way to do that is by using an .FBX format with rigging, which is sadly available only for Poser Pro Game Dev variety of the app, and then, importing into 3ds Max can produce some weird results. In most cases the rigging will be slightly off and the bones will be very tiny / weird, but you can try and give it a shot. That's the only way to do it without re-rigging the whole thing. Wonder how DAZ Studio export rigged FBX files...
I'm trying to visualize the vtk data given here https://www.dropbox.com/sh/51kjftvdko3g6s8/wEe88Id9QN. I'm doing something wrong which probably is related to resolution. I was wondering if anyone runs this code and sends me the result. If that is more clear than the image I have, it's more likely to be related to graphics driver I think. In that case, what may be the cause of this problem? The image my computer generates can be found at the dropbox link, too.
It looks correct to me (a grid of points is being displayed). If you create a vtkImageData from your vtkStructuredPoints, it will be able to interpolate between the points to display a volume.
This is really unknown issue to many people. I would raise a question for it and make it easily accessible for other, and maybe someone of you know the solution for this problem.
All of us probably know that there is problem with alpha transparency in PNG24 in IE6 (still used by many people on web..). There are at least few known solutions how to solve that, but all of them got their problem that I would like to describe there:
1.Using progid:DXImageTransform.Microsoft.AlphaImageLoader:
This is most common trick to make images shown in IE6. Problem is that it uses DirectX to show it. So basically DX firstly need to download file from Net, then render it. This downloading block browser context for a while. But if you have alot of images - that means that you page can be freezed for even... few minutes (it happens to mine one project at least once).
http://blogs.cozi.com/tech/2008/03/transparent-pngs-can-deadlock-ie6.html
http://www.stum.de/2008/12/01/do-not-use-alphaimageloader-to-fix-transparent-pngs-in-ie6/
2.Using VML.
You can also use this workaround. However this has a nasty effect of rendering gray box in background, then a proper image, also causing to download image files twice - this however might be because of bad implementation so need to be checked.
3.Using PNG8.
Just forget about solutions and try use PNG8, if prepared correctly can still be looking good.
If anyone knows any other solution please give answer here!
You should definitely have a look at http://www.dillerdesign.com/experiment/DD_belatedPNG/
Can anyone tell me how i can parse a png image into many png images in J2ME ? I want to write a code that take a image and give many images that have equal pixels.
You mean you want to cut it into smaller images?
Load the image.
Convert to a bitmap.
Encode arbitrary rectangles as PNG.
Save the PNGs.
Unfortunately, I don't know anything about image processing usinf J2ME libraries.
Here's what I googled as far as loading a PNG in J2ME.
Using that, you'll be able to see the API calls used, and following the import list, you'll get to the classes used. Look at those class's methods, and yu'll probably come up with what you need.
I did this mostly because you're having an emergency, but frankly, you could have googled this yourself, or composed a question that was clearer, which would have led to someone more knowledgeable about J2ME image processing helping you.
Just don't panic, take a breath, google for what you need, you'll be fine.