Author Topic: Image Resizer Application  (Read 2348 times)

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Image Resizer Application
« on: January 13, 2017, 04:07:01 PM »
Hey everybody,

I am taking a page from Zax's update thread and am going to make this first post the place where I place any revisions of my ImageResizer app.

I started building this in .NET as that is what I am familiar with programming with. It was then suggested that I try to expand this beyond just Windows. So, I built one in Python. While it worked very well, it required a lot of non standard libraries and some technical know how to get it to run. So, I have now gone back in time to my college years and build it in Java!!! Please comment and let me know what you think!

This is a GUI program and not intended to have arguments passed to it from the command line (you linux users you ;))

I have tested this on Windows 10, Mac OS X and Linux Mint. I have double-clicked it on Windows and Mac. I have run it from the terminal on Mac and Linux. All have worked well.

To run from the terminal:
- navigate to the .jar file location (cd......)
- type: java -jar ImageResizer.jar
- press enter.

Future Improvements:
- Add code to remember directories when searching and selecting source and destination locations
- Improve GUI look and feel

I have not tested this by double clicking the jar file on linux yet. My machine is going through 6 months of updates and I cannot install Java yet to try it out.

I do not plan to make updates to the python or .exe versions of this program. The links in this thread will be taken out soon. Please let me know if you still need either of these versions sooner than later.

Again, thank you all for trying this out and please do not hesitate to provide feedback. I am always open to suggestions.
« Last Edit: March 23, 2017, 07:27:41 PM by ThothLoki »
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1649
    • View Profile
Re: Image Resizer Application
« Reply #1 on: January 13, 2017, 05:36:48 PM »
Any chance you could build for Linux?
SARCASM - Just one more service we offer here.

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #2 on: January 13, 2017, 05:44:54 PM »
Not in this version. I used .net
I do plan on making something similar in python if that would help you.
I do "ok" in python but haven't worked much with tkinter (GUI)
« Last Edit: January 13, 2017, 05:50:49 PM by ThothLoki »
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1649
    • View Profile
Re: Image Resizer Application
« Reply #3 on: January 13, 2017, 06:11:20 PM »
I'm a C/Assembler/Verilog type. Have not a clue about ".net".
SARCASM - Just one more service we offer here.

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #4 on: January 13, 2017, 06:20:37 PM »
Let me look into it. I started learning with Java (years ago...that is all gone now), but have worked a little int vb.net and python.

I am going to try this app on my machine running Mint in Wine and/or Mono. Mono looks kind of interesting. I just heard about it and am interested in it. It looks like you might be able to run .net apps on linux with it.

http://www.mono-project.com/

***EDIT***
I have to do more research on Mono. Looks like it is actually a programming platform. I will keep you updated.
« Last Edit: January 13, 2017, 06:25:16 PM by ThothLoki »
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #5 on: January 13, 2017, 07:10:48 PM »
Just tested the ImageResizer.exe with Wine on Linux Mint "Sarah" and it worked very well. No problems other than having to search for the picture.
I am still installing Mono to see how it will work and what it does. If I can get a native Linux app made, I will let you know.
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #6 on: January 18, 2017, 02:34:24 PM »
@ggallant.
I am working a a python version of the image resizer. This will allow the program to be run on any OS.

I will post it up when I get it working for testing.
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #7 on: February 19, 2017, 06:53:11 PM »
Hey everybody. I have three versions of my image resizer application now. One is windows only. I have two versions written in python. One is a GUI version that mimics the windows version and the other version is command line version (CLI). I will post documentation shortly but all links can be found in this post and in my signature.

Windows Only: http://s000.tinyupload.com/?file_id=08026168675873256893
Python3 GUI: http://s000.tinyupload.com/index.php?file_id=01263870687318492691
Python3 CLI: http://s000.tinyupload.com/index.php?file_id=28965615349383398278

Basic CLI command is as follows: python3 ImageResizerCLI.py [size (-S -M -L)] [filelocation]
example: python3 ImageResizerCLI.py -S linux/user/pictureFolder/picture.jpg


Again, I will get documentation posted on this thread as soon as I get it done.

I have also switched from sharing links from dropbox to using tiny upload.com. This allows me to monitor the number of downloads and not have to host it on my computer. The only down side is that the link becomes dead after 100 days of no use. I will most likely keep bumping the link to keep it alive, but if you find a dead link, please post on this thread and I will rectify the situation.

Thanks again.
« Last Edit: February 19, 2017, 07:08:23 PM by ThothLoki »
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #8 on: March 12, 2017, 09:57:02 PM »
Hi again everybody. After watching a lot of threads, I have come to the conclusion that there are many people here that function differently. Especially when it comes to the OS of preference. Originally, I made my image resizing program for windows, but learned early on that some (ggallant, I'm looking at you) would like this for Linux. I have also seen some on here with Macs.

As a Windows, Mac and Linux user myself, I like being able to use my apps on any machine I am sitting in front of. That is why I am looking to rebuild my app in java. What I am asking of you as the potential users is, what are your thoughts? Will you use a java app? Are you willing to install the JRE (Java Runtime Environment) onto your machine?

A friend at my church told me to look at .net core. It is Microsoft's platform independent code and runtime environment. While I like the sound of a universal.net implementation (I am more of a vb.net and Python coder), my searches bring up more news than tutorials.

I initially learned coding with java, so the learning curve is easier than I expected, with the usual left turns. I am probably going to code it in java as an exercise to show myself that I can actually do it, but I want to hear from you.  There is no point in making something if nobody will use it. I am going to abandon my Python versions. Not because they don't work, but because the initial setup process per machine is a pain in the a$$. I want something simple and universal.

So far, I have tested some GUI layouts and button actions on Windows and Mac. Both work just fine.

I look forward to your input.
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2595
  • Administrator
    • View Profile
Re: Image Resizer Application
« Reply #9 on: March 12, 2017, 10:11:22 PM »
It's extremely easy for someone to run a Java application, so I don't know why someone who had an interest in your new software would not want to run it.

The only thing a user has to do it download and install the Java Runtime library (RTL) and I'll bet many users already have that on their PCs. So all they have to do it just double click on the .jar file.

Universal G-code Sender is a Java application. If anyone can run that software, their system is already setup to run your new software.

I could be wrong, but I don't think you need to ask anyone if they would use a Java app...if they want to use your software bad enough, it's not a big deal to install the Java RTL. T2 and BCL need the .NET library and, those few users who didn't have it, got it, and installed it. The same thing will happen with the Java RTL for your software.

In summary, I think you have an excellent idea to write your program in Java...if I were you, I'd just do it...there really isn't a down side (for you) to doing this.
« Last Edit: March 12, 2017, 10:12:50 PM by Administrator »
Admin -- Ralph -- support @ BenCutLaser dot us
https://www.dropbox.com/s/g8pk9jxmp7q26zs/SetupBenCutLaser2.7b.zip?dl=0
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #10 on: March 12, 2017, 10:36:35 PM »
Thanks Ralph. When I was learning java in the early 00's, it was the ONLY language worth learning. A few years later, I got the impression that people did not like java because it was so slow.  Again that is over 10 years ago, but some things stick in minds. Remember when flash was cool? ;)

I know this app is just a simple image resizing app, but I plan to pick a language and stick with it for future apps. I already have a few in mind.

Like I said before, I don't know much about it, but have you looked into .net core? If it is truly .net across all platforms, how cool would it be to see BCL and T2L on Ubuntu and Mac natively without a VM?!?!? I bet that would make George happy. ;D
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2595
  • Administrator
    • View Profile
Re: Image Resizer Application
« Reply #11 on: March 13, 2017, 07:22:59 AM »
Java IS slow because the code you write gets compiled into what is called .jar files. When you run a .jar file, the Java Runtime Library (RTL) is what parses the .jar file and executes the code. This is like running an interpreter language which is always slower than compiling to native code, which will run much faster.

So, to get your app to run on different OS's, you give up execution speed.
Admin -- Ralph -- support @ BenCutLaser dot us
https://www.dropbox.com/s/g8pk9jxmp7q26zs/SetupBenCutLaser2.7b.zip?dl=0
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

ThothLoki

  • Hero Member
  • *****
  • Posts: 1700
  • Tinkerer
    • View Profile
Re: Image Resizer Application
« Reply #12 on: March 13, 2017, 07:28:09 AM »
Agreed. At least for this application, the speed is a non issue.
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

wild.bill

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
Re: Image Resizer Application
« Reply #13 on: March 13, 2017, 07:32:06 AM »
.... When I was learning java in the early 00's, it was the ONLY language worth learning.....

"C" was always worth learning - I learned it in the 70's and still use it today along with C++
Hey Laser Lips, Your mother was a snowblower

Laser: was an A3 2.0w TTL L6 Z axis now 2'x3'
          K40
3D Printer: Folgers 2020 Pursa i3
                 Folger FT5
                 custom built Pursa i3

Boston Ma, USA

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2595
  • Administrator
    • View Profile
Re: Image Resizer Application
« Reply #14 on: March 13, 2017, 08:36:18 AM »
>how cool would it be to see BCL and T2L on Ubuntu and Mac natively without a VM?!?!?

Cool indeed but not likely to happen for years, if ever. My co-developer Paul (who is more knowledgeable on this) doubts that .NET Core will ever support Winforms and WPF, which is what BCL is...a hybrid app of Winforms and WPF windows application.

Paul pointed out that Mono, which has been around for years, still doesn't support Winforms and WPF. Additionally, if .NET Core were to see it, it would most likely only be WPF as Winforms relies on the Win32 API built into Windows itself. Thus, a WPF-only .NET Core wouldn't work for BCL or T2 for that matter.

I'm sorry George, but unless a miracle happens with .NET Core, there won't be a Linux version of BCL anytime soon.
« Last Edit: March 13, 2017, 08:37:07 AM by Administrator »
Admin -- Ralph -- support @ BenCutLaser dot us
https://www.dropbox.com/s/g8pk9jxmp7q26zs/SetupBenCutLaser2.7b.zip?dl=0
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com