[BLACKBOX] YNT: [BLACKBOX] Producing .PNG file

From: F. Necati Ecevit <"F.>
Date: Sat, 31 Jan 2009 14:59:07 +0200


If I understand correctly, you would like to save your graph view as image file ?
 
if you have a handle to your view, it is possible to convert this view to FIBITMAP and save to png file.
For example, in ObxTickers's HandleModelMsg, after Views.Update(..) store the view as png file, current snapshot of view by using FreeViewToImage.StoreViewAsImage(v,"test.png",24,0).
 
Here, I attached FreeViewToImage module to convert any view (Views.View extension) to FIBITMAP or store the view to file as png file.
 
I hope it helps,
 
Regards,
 
- Necati.
 
StdCoder.Decode KZKNrFpP7pKMbJa9jFqM..,0 1Ak...VB,...58FTuPE,5TWyqlKrqKKrGr

tumdGLmGorCquU2hgnRAXDFTvMUn7FTvMf1G2sETfPdPMHfP9fQbf9hOO9vR7ONbvMoedhgrRi

ioedFWUkTeoxhmhgnpZHZijJC7ONbvM0.,.S.uR7U.QklbcjRAktgdjZgZZh2hgnlsDor.kay4

.qorGqmQiig76FUHZijJCbnWmqmqKWKqtcw7.,.Nd2A,YYGE.2.8cIhgsZiKBhZxintId9NhOO

9HWUlbeZ3Dkto8Y6cw3.0.k1Eb5,0E.CcIhgsNHT9N9ntQ8qorG4704D.CbB,708T1U.Egz.TU

.2uDU.2.AV16.86.QC18RdfQHfMf9R9vQ7ONbXmb.2.w22U.EBU.U,.JFA0z.U.2m,.n.1cUZT

16.,U8,,UO.,E.12,Ue.E.07646.3.1M5.6E6.9N.AUYU.g1IU0KyBU.2.mG.6.c46.,6f6.c8

.2UE0e.Q1QU0KyB.,U40,UO.,.16.c8.2UwK.c,ENE,W.0EiE,eU.6.h.5c,6.VV.IU6U.oEIU

AU.YDIUCU.Q8AUS.N.3c,EU7.1c2ka5.7cUZT1E.6R6.c4E.m80.eWM.2Uw0u.gk0k,O.gY.E0

8,,k2l,.,W.Q.Ej1.5.0kZk,.r,,6.6Whh.0pd8U0Cy2hgqRcjhhhBgiZgZJinpZHZCh0E.4TW

KKv.Uio8.,cw5.0.,,,.B.0UJUcU..7uK1EcCJ,..UiQ8KIrGKfaqm.,Mw..umWuKmO3U.ISE.

656.c.,.,E,U.U60Etv.2.000.O.2.f.77.2.6F.626..U0.,k.0.zTHT8Ff8H986BeQ9PNhOO

9HeyqYqqkSqmin4aEIeGEGokGrmeHE8HO0GWKqluGE8HM0HP0GJam4aEIeW,hio3hjJiu2YChg

XBgoBhUgcXhgqBho3YU2YeAZB.5uPRfR9fQdvQ,NMRPS,dJHPNC566dvP,dFHeEH8JPOEV86Tf

Q,tQdvP66H9R,7RT96196BPONPN,d8HN1PM0HOHVuHZ8J,7FN9P,dCv76BeQAdhBgb7FN9PN76

BeQ9neGromqtmGEWorCLu0pr8LuCLK00wedphYxhrRig2YBxhYVggV72YExhm,b8RT1N76hOO9

ntmGESpouqU0roin4qEeaJcKo4ak2OoY8oY.v7678PNf9BOG3OGkRqk2ak4ak28pryKuCoruKu

KKwGLEqHE0pbaIbGpW8JEGpb0GdKoVyIdGIEWmayKmELCoruKukIqk2ak2SLK0GoeHEaIbGpWS

oW8p4ak2KIbGoRqk4ak283Opo66v76V0I8.UKBhZtQR,am4aU7oidhgrJbUoedhAb1QbBAV7g6

.Fd8WqmmKsKKtCLEOqr8LE0rkaKrGrouqn0GucMH9RPPMV96JN8aEc8pbCoWGoe8pW0GICKR0G

dyqrGrV.2YI3hdRiBxhYhA,78HdC,NHT9NQCP0in4aEVKoXaIbqk2aEdKIeKJduIEuoYmo4akW

uYUYecBB.qUE,..UZ,DONdvIHfS996FtHf8J,tRN76F1sFAZvgV7I6.j96pND,tMRtRr76F96p

ND6OPM090DONd1in4qk2....EbyKtqqkmqoerm0WdI53uHT8H9OERuCPM030Ed.GJdKpWqk2KI

bcHTfQ.r,.UYJbUIejFfkI0GdKqtGrr8bU2ZaJbUoedltocmBghhgv2YgZZUYig2YmZZUIgu2Y

7p7..EfaqmkYuqtGrkmKqOIt4qq2ZaZZUYgioidFK0GMmGE0HKU4BcARe3BZBAV3VGhgn,rN1.

...HlXKaChg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5UXW.2.52.CLLC3b8Rn9P99F9vQ0ks,Uikwm46.Zz,2.,.60,6.e3,E.

cU.UiAco,gA70,E0E...7,,M.,.,.VNgpG.6.rwv1EW991.1.,6.Ikmj,6..EBU.U,.J7.VuI2

U.6.VQ.E..YVsH4ESauhQVs9E3Qw7uPgBkV..E8E...F.,.aU.EsXNv2ouBH,AzJE.nT32iQSB

,dTRI..Gn,...

--- end of encoding ---

  _____

Kimden: BlackBox [BLACKBOX{([at]})nowhere.xy
Tarih: 31 Ocak 2009 Cumartesi 00:52
Kime: BLACKBOX{([at]})nowhere.xy
Konu: [BLACKBOX] Producing .PNG file


I want to have a .png file for a web site. This file will display a graph (of historical unemployment data). In very broad terms, I am choosing between two different ways to do that, and I wondered if the community had any comments.

I. I have one subsystem that is very similar to ObxCharts. This draws a frame with the appearance that I desire for the .png file. It also stores and opens the file, and displays a text with values if the view is left clicked. It reads the .csv files that the Bureau of Labor produces with minimum changes and updates the graph.

This subsystem could be extended with the ideas in ObsTicker and produce a strip-chart that can display real time scientific or economic data, and save snapshots in a way that is completely integrated with BB.

II. I have a different subsystem that is based on the FreeImage.dll (v3.11.0) distribution by Necati Ecevit. I can produce graph in that subsystem and emit a .png file. (Nice effort, saved me much time.)

I seem to have these choices:
1. Write a .png Store converter for my first subsystem. This lays groundwork for an editor and much flexibility.
    Some choices are:
    a. Make a correct DrawLine routine for the Free graphics library, and use it to write a straightforward converter.
         I did read the old V4 oberon code last night, studied Bresenhan, and wrote a correct but not robust or versital version.
    b. or write a Frame and/or Port around the Free library,
    c. gain access to the windows BMP underneath the BlackBox viewer and have Free emit a .png from it. I don't think the viewer is easily available to the converter code.

2. Study and possibly Re factor the Free distribution a bit. Emphasize the use of the FIBITMAP data structure + the graphed data as the model. My 1 day impression is that the windows bitmap and the FIBITMAP data structures are viewed as the models in inconsistent ways in different parts of the project.
Leave my existing LineDraw as it is, use it for this project, put it into the hell directory with all the other one offs.





-- 
-- 
Aubrey McIntosh, Ph.D.
1502 Devon Circle
Austin TX 78723-1814
http://home.grandecom.net/~amcintosh/aubrey/Search/
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Sat Jan 31 2009 - 13:59:07 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:49 UTC