MESSAGE
DATE | 2016-10-13 |
FROM | ruben safir
|
SUBJECT | Subject: [Learn] Fwd: access to the screen
|
From learn-bounces-at-nylxs.com Thu Oct 13 16:37:05 2016 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id E0E2D160862; Thu, 13 Oct 2016 16:37:04 -0400 (EDT) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62]) by mrbrklyn.com (Postfix) with ESMTP id 6CFA01600B4; Thu, 13 Oct 2016 16:37:00 -0400 (EDT) From: ruben safir To: learn-at-nylxs.com, Samir Iabbassen , Ephraim Schnaidman References: <1blgxtgdvo.fsf-at-pfeifferfamily.net> <20161012211102.172-at-kylheku.com> <1bd1j4gw36.fsf-at-pfeifferfamily.net> <57ff7b85$0$7106$426a74cc-at-news.free.fr> Message-ID: Date: Thu, 13 Oct 2016 16:37:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------CC75EB000E208F40DE333227" Subject: [Learn] Fwd: access to the screen X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
This is a multi-part message in MIME format. --------------CC75EB000E208F40DE333227 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit
A starting point maybe..
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="access to the screen.eml"
Path: reader2.panix.com!panix!not-for-mail From: ruben safir Newsgroups: comp.unix.programmer Subject: access to the screen Date: Wed, 12 Oct 2016 21:46:21 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: NNTP-Posting-Host: www.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: reader2.panix.com 1476323181 19915 96.57.23.82 (13 Oct 2016 01:46:21 GMT) X-Complaints-To: abuse-at-panix.com NNTP-Posting-Date: Thu, 13 Oct 2016 01:46:21 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Xref: panix comp.unix.programmer:236538
I have an assignment to read PNG files in parallel and the firs thing I thought of was how do I send the output of the read to the screen?
Ruben
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Joe Pfeiffer Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Wed, 12 Oct 2016 20:51:39 -0600 Organization: A noiseless patient Spider Message-ID: <1blgxtgdvo.fsf-at-pfeifferfamily.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="bef33925f3660632af824c0c5dd05c5d"; logging-data="12608"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX195ScklTnq+VUqNX6TnhVWH6pUsvHPksZY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:V8TaJDKdd4mA2jXSlWeJp5oXTfU= sha1:YXaQYsdSjvhEnSGpNu71cMNOoYw= Xref: panix comp.unix.programmer:236539
ruben safir writes:
> I have an assignment to read PNG files in parallel and the firs thing I > thought of was how do I send the output of the read to the screen?
Is that part of the assignment, or do you just need to show that you've read the file successfully by doing some sort of analysis?
If you really need to display the result, the question varies with which toolkit you're using...
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!not-for-mail From: ruben safir Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Wed, 12 Oct 2016 23:21:36 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <1blgxtgdvo.fsf-at-pfeifferfamily.net> NNTP-Posting-Host: www.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: reader2.panix.com 1476328896 11676 96.57.23.82 (13 Oct 2016 03:21:36 GMT) X-Complaints-To: abuse-at-panix.com NNTP-Posting-Date: Thu, 13 Oct 2016 03:21:36 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <1blgxtgdvo.fsf-at-pfeifferfamily.net> Xref: panix comp.unix.programmer:236540
On 10/12/2016 10:51 PM, Joe Pfeiffer wrote: > Is that part of the assignment, or do you just need to show that you've > read the file successfully by doing some sort of analysis? > > If you really need to display the result, the question varies with which > toolkit you're using...
I need to see it. I need to read it and display it. I assume I'm using X, but can it be sent to a terminal? libpng doesn't access the screen directly? The gimp uses what?
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: Kaz Kylheku <221-501-9011-at-kylheku.com> Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Thu, 13 Oct 2016 04:12:42 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: <20161012211102.172-at-kylheku.com> References: <1blgxtgdvo.fsf-at-pfeifferfamily.net> NNTP-Posting-Host: OGJi3KNpFOhM58UHZwXj0w.user.gioia.aioe.org X-Complaints-To: abuse-at-aioe.org User-Agent: slrn/pre1.0.0-18 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: panix comp.unix.programmer:236541
On 2016-10-13, ruben safir wrote: > On 10/12/2016 10:51 PM, Joe Pfeiffer wrote: >> Is that part of the assignment, or do you just need to show that you've >> read the file successfully by doing some sort of analysis? >> >> If you really need to display the result, the question varies with which >> toolkit you're using... > > > I need to see it. I need to read it and display it. I assume I'm using > X, but can it be sent to a terminal? libpng doesn't access the screen > directly? The gimp uses what?
GIMP sends canvas paint requests to ... that fox which holds the brush in its mouth.
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!not-for-mail From: ruben safir Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Thu, 13 Oct 2016 03:17:51 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <1blgxtgdvo.fsf-at-pfeifferfamily.net> <20161012211102.172-at-kylheku.com> NNTP-Posting-Host: www.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: reader2.panix.com 1476343071 7242 96.57.23.82 (13 Oct 2016 07:17:51 GMT) X-Complaints-To: abuse-at-panix.com NNTP-Posting-Date: Thu, 13 Oct 2016 07:17:51 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <20161012211102.172-at-kylheku.com> Xref: panix comp.unix.programmer:236542
On 10/13/2016 12:12 AM, Kaz Kylheku wrote: > GIMP sends canvas paint requests to ... that fox which holds the brush > in its mouth.
?
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Thu, 13 Oct 2016 04:04:06 -0400 Organization: A noiseless patient Spider Message-ID: References: <1blgxtgdvo.fsf-at-pfeifferfamily.net> <20161012211102.172-at-kylheku.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 13 Oct 2016 08:03:50 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="5704f6683eb59b0d3bc87fa776df7c14"; logging-data="27560"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX1/+EiAjcJfN5/5LuzdQIxfUQWsvTbX7ze8=" User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802) In-Reply-To: Cancel-Lock: sha1:8XB0n4uVkpVCP1MSuMUfnMhmCrw= Xref: panix comp.unix.programmer:236543
ruben safir wrote: > On 10/13/2016 12:12 AM, Kaz Kylheku wrote: >> GIMP sends canvas paint requests to ... that fox which holds the brush >> in its mouth. > > ?
Most people wishing to "open their first window on an X server and display something", look for a tutorial to that effect on the web.
http://math.msu.su/~vvb/2course/Borisenko/CppProjects/GWindow/xintro.html
"This document is a very basic introduction. This is its first draft (2/9/96)."
So that tutorial was written 20 years ago.
You can use a PNG library, prepare a pixmap from the PNG, find some nice tutorial code for resizing a pixmap, make a bunch of thumbnails and plunk them into your main window and so on.
And this part of your project is the easy part. I can't help you with the hard part. As I'm a "copy and paste programmer" :-)
Paul
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Joe Pfeiffer Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Thu, 13 Oct 2016 08:30:37 -0600 Organization: A noiseless patient Spider Message-ID: <1bd1j4gw36.fsf-at-pfeifferfamily.net> References: <1blgxtgdvo.fsf-at-pfeifferfamily.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="bef33925f3660632af824c0c5dd05c5d"; logging-data="5399"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX1+15+OS0QeizHjaeFKphTdY0534G2tpHWE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:femybOgQm8OAGzFhLn3IEHYJNKU= sha1:P430N0ydKsLUMDBvaDkeZKM2UZg= Xref: panix comp.unix.programmer:236547
ruben safir writes:
> On 10/12/2016 10:51 PM, Joe Pfeiffer wrote: >> Is that part of the assignment, or do you just need to show that you've >> read the file successfully by doing some sort of analysis? >> >> If you really need to display the result, the question varies with which >> toolkit you're using... > > > I need to see it. I need to read it and display it. I assume I'm using > X, but can it be sent to a terminal? libpng doesn't access the screen > directly? The gimp uses what?
GTK (the Gimp Toolkit, originally written for the Gimp). See http://www.gtk.org/
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Nobody Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Thu, 13 Oct 2016 10:39:59 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="c045e9da56c1a8601a86555ae899fc6c"; logging-data="12366"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX1+axyRMC8uJWVEOFQNdD5mC" User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Cancel-Lock: sha1:vhyLoDlazmghFvWYnSC3BkaY9bU= Xref: panix comp.unix.programmer:236544
On Wed, 12 Oct 2016 21:46:21 -0400, ruben safir wrote:
> I have an assignment to read PNG files in parallel and the firs thing I > thought of was how do I send the output of the read to the screen?
The easiest solution is to use a GUI toolkit (GTK, Qt, wxWidgets, Tk, ...). There are lower-level solutions using Xlib or even fbdev, but they're more complicated.
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin1!goblin.stu.neva.ru!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp5-1.free.fr!not-for-mail Newsgroups: comp.unix.programmer From: Nicolas George Subject: Re: access to the screen Sender: george-at-phare.invalid (Nicolas George) X-Newsreader: Flrn (0.9.20070704) References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 Date: 13 Oct 2016 12:18:13 GMT Message-ID: <57ff7b85$0$7106$426a74cc-at-news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 13 Oct 2016 14:18:13 CEST NNTP-Posting-Host: 129.199.129.80 X-Trace: 1476361093 news-3.free.fr 7106 129.199.129.80:40501 X-Complaints-To: abuse-at-proxad.net Xref: panix comp.unix.programmer:236546
Nobody , dans le message , a ?crit?: > The easiest solution is to use a GUI toolkit (GTK, Qt, wxWidgets, Tk, > ...).
Piping the image to a viewer is even simpler.
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jorgen Grahn Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: 13 Oct 2016 16:40:31 GMT Message-ID: References: <57ff7b85$0$7106$426a74cc-at-news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: individual.net lbEs9HpXZonRy0aMDDWsUQ/wDRA9Qisflc1TKNBaQ7L487nEM7 Cancel-Lock: sha1:wl42+xXvSqqMkam2NQ4vgahFinA= User-Agent: slrn/pre1.0.0-18 (Linux) Xref: panix comp.unix.programmer:236550
On Thu, 2016-10-13, Nicolas George wrote: > Nobody , dans le message > , a ?crit?: >> The easiest solution is to use a GUI toolkit (GTK, Qt, wxWidgets, Tk, >> ...). > > Piping the image to a viewer is even simpler.
Yes; unless the assignment forbids it[0], I'd probably convert to PNM, and feed it to Imagemagick's display(1) utility, or something.
/Jorgen
[0] But at first it sounded as if the assignment focused on using parallelism for fast PNG decoding. It's unclear why just creating a bitmapped image file in some simple format wouldn't be enough.
-- // Jorgen Grahn \X/ snipabacken.se> O o .
--------------CC75EB000E208F40DE333227 Content-Type: message/rfc822; name="Re: access to the screen.eml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Re: access to the screen.eml"
Path: reader2.panix.com!panix!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Noob Newsgroups: comp.unix.programmer Subject: Re: access to the screen Date: Thu, 13 Oct 2016 12:55:27 +0200 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 13 Oct 2016 10:55:15 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="91763b3df91fe155a5ee02005007e5d4"; logging-data="28504"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX19U+LcxFU5zxxDMZndw0/JmQO6Vczep3w0=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 In-Reply-To: Cancel-Lock: sha1:0X2J6QX6Iq59p+VLtI9MGCAYhtg= Xref: panix comp.unix.programmer:236545
On 13/10/2016 03:46, ruben safir wrote:
> I have an assignment to read PNG files in parallel and the first thing I > thought of was how do I send the output of the read to the screen?
In the old days, one might use DirectFB (defunct) or fbdev.
https://en.wikipedia.org/wiki/DirectFB https://en.wikipedia.org/wiki/Linux_framebuffer
Today, it's gotten more complex with DRI, DRM, Wayland, Mir, etc.
https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure https://en.wikipedia.org/wiki/Direct_Rendering_Manager https://en.wikipedia.org/wiki/Wayland_%28display_server_protocol%29 https://en.wikipedia.org/wiki/Mir_%28software%29
A tutorial might be in order.
http://betteros.org/tut/graphics1.php
If you just want to display to a terminal, you might also consider AAlib or libcaca.
https://en.wikipedia.org/wiki/AAlib https://en.wikipedia.org/wiki/Libcaca
Regards.
--------------CC75EB000E208F40DE333227 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline
_______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
--------------CC75EB000E208F40DE333227--
|
|