GDK: fast image scaling - how?
Hi, I'm using gtk+ 1.2 and want to display some image data by using GDK. The image is already in memory but I want it to display at half size only (in each axis). Is there already a function that can do that ("scale down")? And if not, what would be the best (=fastest working) approach to it? (Btw, Gnome is not installed if there are any libraries for this). A second, related problem is, that I want to take a part of the original image and scale it up by a factor of 2 (like a magnifying glass). Now, is that the same problem as above or is it more simple to achieve? Btw, the up and down scaling hasn't to be of good quality (no anti-aliasing, etc.), simple pixel cutting/duplicating is fine. The image I have is an 8bit grayscale image (748x576). Thanks for helping in advance! Michael. -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: frozen GUI!!! urgent help required!
Hello all, while(g_main_iteration(FALSE)) did help!!! That's great. Anyway, I think I'll go the multithreaded approach (more elegant and 'clean'). Just takes more time... Thanks to you all for the fast replies and given help!!! Many cheers, Michael. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: frozen GUI!!! urgent help required!
Oh hell!!! Now I'm scared! Why did nobody tell me before? Is that common with all GUI toolkits? > Not unless you create a separate thread for the calculations. When the > calculations finish, you should be able to interact with the GUI again. The problem is: I'm no (good) thread programmer and for what I've read in here it seems that Gtk+ wasn't design to be used with threads and there will be much trouble ahead. Am I right? And the other thing is: it was planned that the calculations stop with the click of a button (it's a continuos online calculation/data processing) but thus the button is not clickable under heavy system load there has to be another way around. Isn't there a way to shortly stop calculations (for a necessary minimum of time) and let the GUI gather possible events? Could this work this way somehow? Any suggestions? Every idea is welcome. Thanks again! Many cheers, Michael. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
frozen GUI!!! urgent help required!
Hello all, I've the following situation in/with my GUI (actually I'm using Gtk--, but that shouldn't matter because Gtk-- is only a wrapper for Gtk+): A checkbutton gets pressed and calculations begin (involving retrieving of images from a video camera and processing them). And at this moment the GUI is frozen, no buttons are clickable anymore and the window isn't redrawn when temporary overlapped by other windows. It looks like as if everything is frozen. So, what is going wrong??? Does the GUI of Gtk+ not run parallel to the calculations to fetch X events or is it a fault I just don't see?! I hope someone can help me (soon). Thanks for helping in advance. Cheers, Michael. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: C++ wrapper users please read!
Hi, me again. Seems there are some nice solutions for C++ wrappers (for GTK+). But that throws up the following question: What speaks against "leaving" GTK+ functions as they are and just write a C++ program (without a wrapper)??? Maybe I sound plain stupid now, but, is there also a C wrapper for GTK+??? I mean a wrapper that simplifies GTK+ function handling (without going C++). Thanks for your answers again. With kindest regards, RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
C++ wrapper users please read!
Hello, I'm a newbie to GTK+ (programming) and I only have a minimal clue about C++ wrappers. Due to certain reasons (not explained here) I have to use a C++ wrapper for GTK+. Can anyone (experienced) tell me a good C++ wrapper (btw, someone should update the dead links of the FAQ). How can I "detect" a good from a less good wrapper? Or are they all the same? Thanks for your answers! My kindest regards, RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
how to update the content of a vbox???
Hi, in my user interface there's a vbox which contains a pixmap (image) at the moment. But I want to update this (vbox) by the click on a button (replace "old" pixmap with ie. another pixmap). Can anyone tell me how to do that? Hints are also welcome. Thanks in advance. Cheers, RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
2 questions about ItemFactory and importing 3rd party code
Hi, (me again) my first question about ItemFactory: I've made a menu with a ToggleItem (a check-button to be exact) but there's no documentation on how to set or unset it (change states) from within my programme. Does anyone know??? Second question: Has anyone any experience with integrating MatLab C export files into the GTK+ UI, like displaying a graph in a window??? Help appreciated! Thanks alot in advance, RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
can't find a certain old posting - please help!
Hi, even though the search function works fine now I wasn't able to "locate" an old posting which was written sometime in the last 4 months. Here are the details of what I know that was in it: Someone asked about something, I think about dialogs. Then someone else came up with a VERY NICE generic routine: a function that opened a dialog window and displayed a text message which was passed to the function as an argument. I think there was also a YES/NO button. Not sure about that. Can anyone remember this posting with the listing and point me to it??? Thanks for helping in advance, RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Where to get more tuts and examples?
Hi, does anyone know if there's another source for tutorials and (small) code examples besides the "official stuff" (for GTK 1.2.10)??? Thanks in advance. RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
autoclose window on progressbar event???
Hi, I've taken the tutorial example of the progressbar, to open it up in a separate (POPUP-style or DIALOG-style) window. Instead of cycling it (0%->100%->0%...) I want it to stop when it reaches 100% and automatically close it's window (as mentioned before, it's not the TOPLEVEL one). How can I do that? Thanks for answers!!! Bye, RevX -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
passing data to text entry field
Hi, following question: Imagine, a text entry field (with some default text in it), and a button, which calls up the file selection dialog. Ok, now I want to pass the selected file(name) to the text entry field. How do I do that? Any help appreciated. Thanks in advance! RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
3 minor important questions...
Hi, I have 3 questions that might be a bit off-topic, but I ask them anyway: 1. Is it possible that the gtkfaq-8 und gtkfaq-9 html files are missing in the gtk+-1.2.10 package??? 2. Some XPM files have 6 byte color codes instead of the (normal) 3 byte (#RRGGBB), what do those 6 byte color codes represent/mean? 3. Does anyone know any Windows(!) programs (freeware/shareware preferred) that allow to convert BMP or GIF of JPG to XPM files? Thanks to all that help, cheers, RevX. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
question about GTK+ and LGPL
Hello everybody, this is my first message to this mailing list, so, don't beat me if I go against some rules. To my question: is it correct, that I can use/sell my programs (using GTK+) commercially, WITHOUT paying a license fee to someone??? I don't plan to make modifications to the GTK+ library. I'll just use some of it's provided functions. (Btw, the LGPL was too complicated for me to understand and I can't afford a lawyer ;-). Thanks for any given help, with kindest regards, Michael. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list