hurodal 2 Posted April 8, 2022 (edited) Hi there, This is my first message here. I'm here because I have been given all the resources of an open-source project called CoCa (ICC Color Camera Calibrator) which is a software that makes ICC color profiles for cameras and scanners. His author is getting old and cannot continue it so I want to continue. My problem is that I know nothing about Delphi nor programming (other than BASIC that I learnt as a child with my Spectrum 48K) but I do know about camera profiling and color management. This is the original webpage of the project (cloned into my server) so you can see how it looks and works. https://www.hugorodriguez.com/calibracion/coca_web/coca_page.html I'm looking for someone that loves photography and digital imaging and delphy to continue this project. I've been told that a good step would be to convert this code to python or other language that doesn't need so much text (as delphy) to make it more easier to work, but these are not my words so I cannot say. Please if anyone likes this and want to help to this open-source project, contact me. Best regards, Hugo Rodriguez Edited April 9, 2022 by hurodal 1 Share this post Link to post
Fr0sT.Brutal 900 Posted April 8, 2022 1 hour ago, hurodal said: convert this code to python or other language that doesn't need so much text (as delphy) only in the form "(import some-library-that-will-do-all-the-work).run()" 3 Share this post Link to post
dummzeuch 1515 Posted April 8, 2022 Is the source code available in an SCM somewhere? That would be the very first step. (No, I'm not a photography enthusiast and I haven't got the time for yet another open source project.) Share this post Link to post
Sherlock 663 Posted April 8, 2022 20 minutes ago, Fr0sT.Brutal said: only in the form "(import some-library-that-will-do-all-the-work).run()" You forgot the "...which in turn import a ton of more libraries all of which may or may not contain some serious security issues" part 😉 3 Share this post Link to post
Vincent Gsell 11 Posted April 8, 2022 46 minutes ago, Fr0sT.Brutal said: only in the form "(import some-library-that-will-do-all-the-work).run()" :))) Hugo : I like photography, but I don't have too much time too, but the project looks interesting !! Note: on the website you provided, the sources are not downloadable (Broken link) I also allow myself to try to "translate the joke" of Frost to help you, Hugo (As I understand, your are not developer) : - Python is a language that mainly calls libraries, written in languages like c, c++, pascal (or any other archetypal language) - Python therefore allows easy access to an underlying complexity. *But*, this complexity is hidden in libraries. No magic. - So, in your case, rewriting in python what your program does is total nonsense : It would it be 1000 times slower, it wouldn't be necessarily simpler, and it would be as verbose as it is now. And many times more weak, technically/support speaking. Ultimately, you would have to make a library of the "business" points of your program, then, it'll allow an "easy" access with python. That would make sense. But that's up for discussion, and it more a strategic question. That said, in your case, I would rather advise to begin to put your project on github (or other), in order to potentially interest other devs? cheers, and good luck for this nice project. 1 Share this post Link to post
hurodal 2 Posted April 9, 2022 (edited) 21 hours ago, dummzeuch said: Is the source code available in an SCM somewhere? That would be the very first step. (No, I'm not a photography enthusiast and I haven't got the time for yet another open source project.) Yes, it is available, but not yet. I have the files but all together and I'm still waiting for some explanation about what the source code files are. [update] I just uploaded the files and updated the links. Edited April 9, 2022 by hurodal Share this post Link to post
hurodal 2 Posted April 9, 2022 20 hours ago, Vincent Gsell said: :))) Hugo : I like photography, but I don't have too much time too, but the project looks interesting !! Note: on the website you provided, the sources are not downloadable (Broken link) I also allow myself to try to "translate the joke" of Frost to help you, Hugo (As I understand, your are not developer) : - Python is a language that mainly calls libraries, written in languages like c, c++, pascal (or any other archetypal language) - Python therefore allows easy access to an underlying complexity. *But*, this complexity is hidden in libraries. No magic. - So, in your case, rewriting in python what your program does is total nonsense : It would it be 1000 times slower, it wouldn't be necessarily simpler, and it would be as verbose as it is now. And many times more weak, technically/support speaking. Ultimately, you would have to make a library of the "business" points of your program, then, it'll allow an "easy" access with python. That would make sense. But that's up for discussion, and it more a strategic question. That said, in your case, I would rather advise to begin to put your project on github (or other), in order to potentially interest other devs? cheers, and good luck for this nice project. Hi. Yes, I was aware but I just uploaded the HTML and did not have time to update it and upload the files somewhere. Now is updated and with working links. Thanks for the explanation. Although I'm don't have knowledge in programming, I still remember BASIC from my Spectrum 48K and a few visual basic that I learnt many years ago, so I got the joke. Anyway as I explained, I was told that, not my words. I don't know what's Github, but if you explain me a bit I'm wide open to collaborating work. I was told that Delphy programming requires a quite expensive license (around 3000€). Is that true? Thanks! Share this post Link to post
Vincent Gsell 11 Posted April 9, 2022 (edited) ah ! if you get the joke, you're near to be a dev, sorry to hear that :)))) - The link correction is ok, and I was able to download it and have a (very) quick look: - the program is very tiny, and handles mostly the user interface. - As I see it (but short study, I may be wrong), the core of the program build a ".bat" file by adding command lines (from the UI data), and then executes it. (with argyll external binaries) - The program has (a lot of) dependencies throught commercial components. (TadvSmoothpanel (TMS software), TimageEnVie (ImageEn), TpLsController (Precision Language Suite) - Delphi (With an "I" not an "Y" !) is a commercial product, yes. But you have delphi Community Edition, which is quite complete and can be used for non commercial product for free. https://www.embarcadero.com/fr/products/delphi/starter/free-download Here, your very first problem is commercial components : For an OpenSource product, It is quite limitating. Very sorry for the delphi world, but as I see it, if "multilingual" stuff and "UI" stuff is not important for you, yes, it can be rewrite in python :)))) ---> Delphi has been used here to give to the product a cool UI, imho. - Github is a SCM. (A very tiny and discreet one) 😄 As I said, I have no personal time for that, but put it on a SCM could help, or, perhaps, directly on the business interest area (print, photography and so on) where a casual dev could handle it, ihmo) Edited April 9, 2022 by Vincent Gsell 1 Share this post Link to post
hurodal 2 Posted April 10, 2022 22 hours ago, Vincent Gsell said: As I see it (but short study, I may be wrong), the core of the program build a ".bat" file by adding command lines (from the UI data), and then executes it. (with argyll external binaries) Then you know a lot more than me. But yes, as it relies on Argyll and this program works with command line it makes sense. 22 hours ago, Vincent Gsell said: The program has (a lot of) dependencies throught commercial components. (TadvSmoothpanel (TMS software), TimageEnVie (ImageEn), TpLsController (Precision Language Suite) I was told this by the author: For building CoCa I used some additional free and non-free components. I list them below: Free additional components: PJShellFolders - http://sunsite.icm.edu.pl/delphi/d10free/pjshfldr.htm Precision Language Suite (free version) - http://www.be-precision.com/products/precision-langs/ Carbonsoft cxDrive v.1.0 - https://torry.net/files/vcl/filedrv/driveinformation/cxdrive1_r1005.zip Non-free components: TMS Components - https://www.tmssoftware.com ImageEn https://www.imageen.com Also, to create MS Windows installer I used Inno Setup – a free package that you can download from https://jrsoftware.org 22 hours ago, Vincent Gsell said: Delphi (With an "I" not an "Y" !) is a commercial product, yes. But you have delphi Community Edition, which is quite complete and can be used for non commercial product for free. Great to know. something to consider indeed! 22 hours ago, Vincent Gsell said: Very sorry for the delphi world, but as I see it, if "multilingual" stuff and "UI" stuff is not important for you, yes, it can be rewrite in python :)))) ---> Delphi has been used here to give to the product a cool UI, imho Well, the UI with all those 'floating' buttons and all that to my taste is something more of old desing from the 2000s. I'd prefer a more slick design without bells and whistles. If it's a tiny program, requires an expensive license to develop and can be translated to a cheaper and more spread language, translating it is something to consider... But... what language could be better. What's the main point of the main languages out there? What are their advantages and drawbacks? 22 hours ago, Vincent Gsell said: Github is a SCM What's an SCM? I guess S for source and C for Code... Thanks for the kind help! 1 Share this post Link to post
Lajos Juhász 295 Posted April 10, 2022 1 hour ago, hurodal said: What's an SCM? I guess S for source and C for Code... Source code management Source code management (SCM) is used to track modifications to a source code repository. SCM tracks a running history of changes to a code base and helps resolve conflicts when merging updates from multiple contributors. Share this post Link to post
limelect 48 Posted April 12, 2022 Component "TplsController" is missing. If it is not open source not useful 1 Share this post Link to post
hurodal 2 Posted April 13, 2022 23 hours ago, limelect said: Component "TplsController" is missing. If it is not open source not useful I think you didn't read my message above where I list the components needed... There you can see where you can find that component: Precision Language Suite (free version) - http://www.be-precision.com/products/precision-langs Share this post Link to post
limelect 48 Posted April 14, 2022 and you did not read my comment If it is not open source not useful !!!!! 1 Share this post Link to post
SwiftExpat 65 Posted April 14, 2022 31 minutes ago, limelect said: If it is not open source not useful !!!!! A lot of the TMS components can be very useful even under the demo license terms. Get the app compiling then you can figure out what you really want to replace. Share this post Link to post
Joseph MItzen 252 Posted April 15, 2022 (edited) On 4/8/2022 at 4:46 AM, Vincent Gsell said: - Python is a language that mainly calls libraries, written in languages like c, c++, pascal (or any other archetypal language) Python is a language that has over 360K open source libraries available in its package manager, hence there is very little need to reinvent the wheel, and the Python Package Index has over 360K wheels. Most of those 360K libraries are written in python. JP Morgan revealed they had 35 million lines of Python code when discussing porting Python 2 code to Python 3, and Dropbox has stated in interviews that it has 4 million lines of Python code. Python isn't merely a wrapper for C++. Because it can be the ultimate glue language (wrappers exist for most languages) doesn't remotely mean that's all it's good for. For instance, Python powers some of the most trafficked sites on the Internet as well, including Reddit, Instagram and Pinterest. On 4/8/2022 at 4:46 AM, Vincent Gsell said: Python therefore allows easy access to an underlying complexity. *But*, this complexity is hidden in libraries. No magic. This is simply incorrect. The language has many features that reduce the need for code (not the least of which is dynamic typing). Python guru Raymond Hettinger has said that any step that can be expressed in a single English sentence should be able to be written in a single line of Python code. I've personally ported many older Delphi programs to Python. Admittedly Delphi has added many nice things to require less code (such as type inference) since those programs were written. But using Delphi 5 to 7-era codebases as a metric, I found that the Python savings grew larger as the Delphi code size increased. The largest program I converted had the biggest line count ratio difference, with the Python program being 1/6 the number of lines of the original Delphi program. Python offers list comprehensions, a real set type (not a boolean array pretending to be a set), decorators, context managers, bigints, arbitrary precision, fractions, complex numbers, dictionary literals, default dicts, multiple inheritance, named tuples, iteration everywhere, array slicing, yield, generator expressions, a new high-powered case/switch statement dubbed 'structured pattern matching' that's one part case statement one part regex, async, a very smart string that automatically stores text as anything from UTF-8 to UTF-32 internally as needed, argument packing/unpacking, f-strings, a datetime that's both timezone and daylight savings time aware, keyword arguments, assignment expressions, try-else-finally :-), ... the list goes on and on. No magic? The only magic it doesn't have is Penn and Teller. On 4/8/2022 at 4:46 AM, Vincent Gsell said: So, in your case, rewriting in python what your program does is total nonsense : It would it be 1000 times slower, it wouldn't be necessarily simpler, and it would be as verbose as it is now. And many times more weak, technically/support speaking. If the benchmark question I posted here a few weeks ago is any indication, it could end up being 5X faster. It would definitely be simpler and far less verbose, especially since this is older code. And not "weak" because it would be utilizing modern, well-supported open source libraries for everything but the application-specific functionality (which should be put in its own library so others can use it in the future!). These were the top ten most downloaded Python modules in the last day: 1 boto3 9,519,635 2 requests 7,999,561 3 urllib3 7,918,776 4 setuptools 7,705,713 5 botocore 7,584,452 6 idna 6,303,478 7 s3transfer 6,256,215 8 typing-extensions 5,983,085 9 six 5,880,653 10 certifi 5,595,107 11 python-dateutil 5,563,439 12 pyyaml 5,482,592 13 charset-normalizer 5,112,908 14 click 4,330,631 15 awscli 4,317,207 16 wheel 4,218,955 17 numpy 4,078,225 18 pyparsing 4,078,047 19 packaging 4,043,536 20 cryptography 3,917,836 In the last day, the least-downloaded package on that list was downloaded about 8X more than the number of Delphi users on Earth. If Linus' Law, "Given enough eyeballs, all bugs are shallow" holds, that's a lot of eyeballs. (In the last month, the #1 package on that list was downloaded 253 million times!!!). With that level of usage, and the fact that the source is open, this greatly diminishes the odds of encountering a "corner case" bug in a popular package, or of bugs going unfixed for years as in certain, um, other libraries. I don't see how this type of usage and visibility would render things less, as opposed to more, secure. I'm not going to weigh all the pros and cons of porting code, especially without examining the code first, but you neglect to mention that porting to Python will open up a much larger pool of potential contributors than sticking with Delphi, which for a potential open source project would be a major factor. Python is also popular among digital studios (Disney was a major sponsor of one of the PyCon events for this reason), the open source 3D modeling software Blender and the open source image editing program GIMP both offer support for plugins written in Python, openCV maintains its own Python wrapper, and the Python package Pillow is very popular for scripted/automated image manipulation. There are also plenty of articles like the below (as well as podcast episodes with similar topics) floating around: https://blog.matthewgove.com/2021/02/06/photographers-heres-how-to-boost-your-income-with-python-automation/ Heck, they're even offering the same idea to KIDS today.... https://kidscodecs.com/python-photo-editing-pilow/ In short, you're likely to find more serious photographers have already been exposed to Python than to Delphi. Many also use Macs, which means that the old Delphi program would need to be ported anyway to FireMonkey if it wanted to reach that sizable base of users (Python, of course, supports all major and minor operating systems). Finally, open source enthusiasts are unlikely to warm to the idea of needing to use a proprietary language, IDE and framework to contribute to the project. Even taking into account the monetarily free version, they're unlikely to treasure needing to give personal info to Embarcadero, the stream of emails (and sometimes phone calls!), etc. And needing to develop on Windows? That might be the final straw. The 2021 Stack Overflow Survey shows that 45.33% of developers do their work in Windows, with 25.32% in Linux, 25.19% in OS X, 3.29% in Windows Subsystem for Linux, and 0.18% in BSD. You shrink the potential contributor pool by more than half by limiting developers to Windows. I have no numbers for this, but my instinct suggests the biggest enthusiasts for open source contribution are probably disproportionately found in that 25.32% who are using Linux as well. There are a lot of factors to consider, but with all due respect I hardly consider the option to port the project to Python "nonsense". Attached to the bottom are two images; one is from an article on a programming competition website discussing whether Python should be an allowable language and the second is from an old Paypal Engineers' blog entry called "10 Myths Of Enterprise Python" comparing their ASF XML Serialization library written in C++ to the version they rewrote with Python (1580 lines vs. 130!). Edited April 15, 2022 by Joseph MItzen spelling Share this post Link to post
Joseph MItzen 252 Posted April 15, 2022 On 4/8/2022 at 4:18 AM, Sherlock said: You forgot the "...which in turn import a ton of more libraries all of which may or may not contain some serious security issues" part 😉 Yes, better to use Delphi, where you can be sure it contains serious security issues! I don't think we're in a position to snipe... what follows is a portion of the log Core Security Technologies kept of their attempt to report the VCL Buffer Overflow vulnerability to Embarcadero. You might want to have some tissues handy.... Report Timeline 2014-05-29: Core Security Technologies attempts to contact Embarcadero. 2014-06-03: Core Security Technologies asks for a reply. 2014-06-09: Core Security Technologies attempts to contact vendor again. 2014-06-12: Core Security Technologies contacts the US-CERT for assistance in order to coordinate the "coordinated disclosure" of the advisory. 2014-06-16: US-CERT answers assigning the following tracking code to the report: VU#646748. 2014-06-30: First release date missed. 2014-07-10: US-CERT informs that they were able to contact the vendor and that a public bug tracking link was published by Embarcadero. 2014-07-10: Core Security Technologies contacts the US-CERT asking for vendor's contact information and informs them that the Embarcadero's bug tracking entry forces us to publish the advisory because the vulnerability details are now public. 2014-07-28: Core Security Technologies receives a reply from Embarcadero stating they expect to have a tentative date for a fix the week of July 28,2014. 2014-07-29: Core Security Technologies replies to Embarcadero that considering there is a public bug tracking report link, we would like to publish the advisory as soon as possible in order to help to protect the users. 2014-08-04: Embarcadero informs Core Security Technologies that they have a fix ready which is currently under internal review. They hope to give Core Security Technologies an expected release date by the end of the week. 2014-08-08: Expected release date (or reply) not received from Embarcadero, Core Security Technologies writes again asking for an update. 2014-08-11: Core Security Technologies notices the status of the public bug tracking report was changed to "fixed". Core Security Technologies emails the Embarcadero asking for clarification about the new status. Two questions are submitted to the Embarcadero (1) Core Security Technologies asks Embarcadero to confirm whether the new status means the fix was made public and (2) in case the fix is still not public, Core Security Technologies requests the tentative release date. 2014-08-11: Embarcadero informs Core Security Technologies that they are testing the fix internally and that they are planning to release it publicly on August 15, 2014. 2014-08-11: Core Security Technologies requests Embarcadero link to the fix so it can be include in the coordinated advisory report. 2014-08-11: Embarcadero replies to Core Security Technologies stating that the link will be delivered August 15, 2014. 2014-08-12: Core Security Technologies requests the estimated time when the fix will be public on August 15, 2014. 2014-08-12: Embarcadero replies that they estimate the fix will be released on August 15, 2014, at 3 p.m. PDT. 2014-08-14: Core Security Technologies requests Embarcadero to postpone the fix release day to August 18, 2014 in order to give users time to patch their software and avoid giving a two-day head start to potential malicious parties. Core Security Technologies informs Embarcadero that it will release the advisory on August 19, 2014 if they accept the postponement. Additionally, Core Security Technologies offers help in contacting third parties affected by this vulnerability. 2014-08-14: Embarcadero agrees with suggested release approach and will postpone the publishing of the fix until August 18, 2014 at 10 a.m. PDT. They also state they are internally discussing how they will notify their customers. 2014-08-15: Core Security Technologies requests Embarcadero deliver the support article and fix so it can be verified. 2014-08-15: Embarcadero sends Core Security Technologies a copy of the support article. 2014-08-15: Upon review of the proposed fix, Core Security Technologies informs Embarcadero that the fix seems incorrect. 2014-08-15: Embarcadero indicates they will investigate based on that assessment of the fix, and says they will need to delay the publishing of the fix until the issue is resolved. 2014-08-15: Embarcadero confirms a problem with the proposed fix was included in the support article and indicates they have a fixed the problem. Embarcadero requests confirmation from Core Security Technologies regarding the new article that includes the updated fix. 2014-08-18: Embarcadero informs Core Security Technologies of updated content in the article, and proposes publishing the same day. 2014-08-18: Core Security Technologies didn't reply due to a national holiday affecting their Buenos Aires offices, but Embarcadero publishes the fix and an accompanying support article. 2014-08-19: Core Security Technologies requests the fix from Embarcadero to update the advisory and verify it. 2014-08-19: Embarcadero replies sending Core Security Technologies a link to the fix. Due to the fact that the fix was released on August 18, 2014 Core Security Technologies schedules the advisory publication for August 20, 2014, leaving the fix analysis task for post-advisory release. 2014-08-20: Advisory CORE-2014-0004 published. 1 Share this post Link to post
Joseph MItzen 252 Posted April 15, 2022 On 4/9/2022 at 3:56 AM, Vincent Gsell said: Very sorry for the delphi world, but as I see it, if "multilingual" stuff and "UI" stuff is not important for you, yes, it can be rewrite in python :)))) The Qt Company produces their own LGPL bindings for the Qt cross-platform GUI framework. Python also has bindings for the other major open source cross-platform frameworks, Gtk and WxWidgets, as well as bindings to native Windows and Coco libraries. Notable open source programs that use Python and Qt are the ebook management program Calibre, the Dropbox client, the OpenShot video editor, the Orange data mining suite, the Puddletag audio metadata editor, the QGIS Geographical Information System, the TortoiseHg front-end for the distributed version control system Mercurial, and the IDEs ERIC and Spyder. Have you looked at the pictures of this program? It's not much beyond some drop-downs and toggle buttons. Python has a multilingual internationalization services module in its standard library. Oh, and unlike VCL and FireMonkey, Qt supports right to left languages. 😜 Share this post Link to post
Joseph MItzen 252 Posted April 15, 2022 (edited) On 4/8/2022 at 3:56 AM, Fr0sT.Brutal said: only in the form "(import some-library-that-will-do-all-the-work).run()" You left out a step... now if Embarcadero has its way it's going to be... run Delphi to call Python to call some library that will do all the work! Ironically by the way this Delphi program CoCa is simply a GUI that builds a command line to use to call a C++ program, Argyll, that indeed does all the work. Edited April 15, 2022 by Joseph MItzen Share this post Link to post
hurodal 2 Posted April 16, 2022 On 4/14/2022 at 6:33 PM, limelect said: and you did not read my comment If it is not open source not useful !!!!! ok, thanks for your point. The project is as-is. I didn't created it, jut trying to keep it alive. Share this post Link to post
hurodal 2 Posted April 16, 2022 On 4/15/2022 at 5:58 AM, Joseph MItzen said: Python is a language that has over 360K open source libraries available in its package manager, hence there is very little need to reinvent the wheel, and the Python Package Index has over 360K wheels. Most of those 360K libraries are written in python. JP Morgan revealed they had 35 million lines of Python code when discussing porting Python 2 code to Python 3, and Dropbox has stated in interviews that it has 4 million lines of Python code. Python isn't merely a wrapper for C++. Because it can be the ultimate glue language (wrappers exist for most languages) doesn't remotely mean that's all it's good for. For instance, Python powers some of the most trafficked sites on the Internet as well, including Reddit, Instagram and Pinterest. This is simply incorrect. The language has many features that reduce the need for code (not the least of which is dynamic typing). Python guru Raymond Hettinger has said that any step that can be expressed in a single English sentence should be able to be written in a single line of Python code. I've personally ported many older Delphi programs to Python. Admittedly Delphi has added many nice things to require less code (such as type inference) since those programs were written. But using Delphi 5 to 7-era codebases as a metric, I found that the Python savings grew larger as the Delphi code size increased. The largest program I converted had the biggest line count ratio difference, with the Python program being 1/6 the number of lines of the original Delphi program. Thanks Joseph, your message is really useful. Although I don't have knowledge of Delphi nor Python I understand that porting the code can be a good idea, not just for its technical advantages but because of the highly spreaded knowledge out there, and finding people interested in this project is the key to make it survive. There aren't free softwares (Gui based) to make ICC color profiles out there and keeping the only alternative is important. As you said, CoCa is simply a GUI that builds a command line to use to call a C++ program, Argyll, that indeed does all the work. So, wouldn't it be so hard to port, right? Another question for you experts: I know there are many languages out there. For this simple GUI program, what language could be the best choice to port to if the main goals are: - free or cheap license to program it - easy to contribute by several people - maybe easy to compile to Mac & Linux? Share this post Link to post
hurodal 2 Posted April 16, 2022 I've created an updated, more modern, official page for CoCa with all the information (also with a link to this thread): https://www.hugorodriguez.com/blog/coca-icc-color-camera-calibrator/ Share this post Link to post
Fr0sT.Brutal 900 Posted April 18, 2022 On 4/15/2022 at 6:58 AM, Joseph MItzen said: Python offers ... the list goes on and on. No magic? The only magic it doesn't have is Penn and Teller. ...and still no multithreading 😄 Quote CPython implementation detail: In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation). Moreover, rewriting GUI wrapper, as in subject, in Python is twice senseless. 1 Share this post Link to post