[casetta] New img_to_basic function (produce smaller programs for simple pictures) |
[ Thread Index | Date Index | More lists.tuxfamily.org/casetta Archives ]
Hello, Thank you for proposing me an svn account but I think that's not a good idea. I mean, I am a not-experienced programmer and can add bad code and I don't really know how to use svn (I think I could delete all the svn in 10s :-). However, If you are bored with adding my code to the svn, I can accept. New img_to_basic function I'm now in holidays and I took advantage of my free time to rewrite this function. It is now much longer (~200 lines) and constituted of 2 main blocks (separated by big comments) : - The first main block tries to break down (fr: décomposer) the picture into HORIZONTAL F-lines - The second main block tries to break down the picture into VERTICAL F-lines. Each main block contains 3 sub-blocks to detect begin, end of F-lines and one another to continue them. For each main block, rather than drawing an orphan Plot-on, I store its coords in a plot_table. There is, at the end of each main block a sub-block which analyses this table and tries to detect VERTICAL F-lines for the first block (contrary to the direction of all the F-lines created by this first main block) and HORIZONTAL F-lines ofr the second (contrary to the direction of all the F-lines created by the second main block). If what I say is not clear and if you want to understand, read the code ;-). No, seriously, I can re-explain what I did if you don't see what I mean (I suppose that's not very clear). This new function produces smaller Casio Basic programs for pictures containing lots of Vertical F-lines and simple pictures (not coloured) but the benefit is invisible for coloured pictures like the tux I sent you. However this function is not perfect : the best would be to break down the function in less lines (both Vertical and Horizontal F-lines) possible, but I said it before I don't know how to do that. Casetta Internal transfert tool It works great : I have no more fickering for the progress bar (sys.stdout.flush() helped, I think ;-)) no more problems to receive screencaptures. I can receive pictures,screencaptures, pictures, programs and backups without any issues. Perfectly good :-). I CAN'T send pictures (in png format, good format because they were previously received by casetta_cli). Here is what I get : fabien@PCXion345:~/src/casetta/casetta_cli$ ./casetta_cli.py img.png casio Wait until the calculator is ready... Header [==================================================] (100%) 49/49 Picture1 [==================================================] (100%) 1028/1028 (Only 1028 octets transfered ?) The transfer abort because of a checksum error. Please check your link. (small msitake here : the transfert has just aborted or aborted or aborts) Nothing is displayed before the progress bar while receiving a screencapture (I think that's intentionnal, so it's OK). Previously, I had also a bug when using the keyword casio if the default tool was not set, It seems to be corrected. Image extractor from backups Could you write the raw/cafix picture specifications or explain me how they are stored (by mail) ? Because it seems that not all the metadata stored in cafix/raw picture files can be found in raw backups. And I can't understand that pictures take 4111o and screencaptures 3075o, while same data is stored : the metadata must be different. Casetta_gtk and syntax hilighting Is Choplar still working on casetta_gtk ? Can I solve this problem of syntax coloration whitout stealing his job ? I don't know PyGTK becuase usually, I use PyQt but I will try to look inside Gedit source code and give ideas about improving syntax coloration in casetta Thank you for reading this loooooooooooong e-mail ! --
Linux User #418689 -- fabien.andre.g@xxxxxxxxxx -- xion345@xxxxxxxxxxxxx World domination. Fast. ( Linus Torvalds, Not dated ) |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |