Recent

Author Topic: I will make a photoshop killer  (Read 1787 times)

twolivesbehindschedule

  • Newbie
  • Posts: 6
I will make a photoshop killer
« on: October 02, 2020, 05:00:43 pm »
Hello there
I want to make a program for windows that gets an image from whatever folder that the exe is going to be (so some how the program has to get the directory that it is in) and display it in a window with scrollbars in the exact original size without deforming it in any way...

so my question for start is free Pascal or Lazarus?

Thanks

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11459
  • FPC developer.
Re: I will make a photoshop killer
« Reply #1 on: October 02, 2020, 05:04:22 pm »
lazarus

twolivesbehindschedule

  • Newbie
  • Posts: 6
Re: I will make a photoshop killer
« Reply #2 on: October 02, 2020, 05:55:25 pm »
Thanks for immediate response Markov
I will make proper threads but for convenience

Does Lazarus support transparency?
even multiple transparency?

for example i may need to display transparent gifs one over the other and in the transparent areas i want the gif behind to be visible, maybe multiple 3-4

even transparent cells with ascii characters (like of excel) over the gifs...

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: I will make a photoshop killer
« Reply #3 on: October 04, 2020, 11:16:16 am »
Does Lazarus support transparency?
even multiple transparency?
Check the BGRABitmap components, I'm sure it will help.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: I will make a photoshop killer
« Reply #4 on: October 04, 2020, 11:33:02 am »
Hi!

And have a look at the BGRA bitmap tutorial how to work with BGRA:

https://wiki.freepascal.org/BGRABitmap_tutorial_1

Winni

Handoko

  • Hero Member
  • *****
  • Posts: 5158
  • My goal: build my own game engine using Lazarus
Re: I will make a photoshop killer
« Reply #5 on: October 04, 2020, 12:15:45 pm »
Does Lazarus support transparency?

Lazarus itself does not directly deal with transparency nor graphics. It depends on the graphics library you use when writing the program. Here is a list of available graphics libraries for Lazarus/FPC:

https://wiki.freepascal.org/Graphics_libraries

TCanvas has bad transparency support and it is slow, don't use it for developing professional graphics software. But if you are new in graphics programming, I recommend you to learn TCanvas first. It is much easier than the others and requires zero installation. Here has some short tutorials for TCanvas:

https://wiki.freepascal.org/Developing_with_Graphics#Working_with_TCanvas

Once you have basic knowledge on graphics programming, you should try the others. Most people will recommend BGRABitmap. It has lots of features, actively maintained and developer visits this forum regularly. If you can use TCanvas, learning BGRABitmap is easier because basically BGRABitmap is TCanvas + extra features. And yes, BGRABitmap can do all the graphics things you mentioned.

I built a simple analog clock, which uses BGRABitmap. The clocks itself are actually 4 transparent images layering together: the clock background, the hour hand, the minute hand and the second hand. You can grab the source code, compile, run and study how it works. This is the source code of CATWW version 0.2:

https://forum.lazarus.freepascal.org/index.php/topic,50989.msg373578.html#msg373578

CATWW version 0.3 has a lot of cosmetic improvements and it's still using BGRABitmap. Unfortunately, it is not ready to be released to the public. Below is a sneakpeak of CATWW 0.3:
« Last Edit: October 04, 2020, 12:19:47 pm by Handoko »

Fred vS

  • Hero Member
  • *****
  • Posts: 3168
    • StrumPract is the musicians best friend
Re: I will make a photoshop killer
« Reply #6 on: October 04, 2020, 12:42:08 pm »
I will make a photoshop killer.

Hello.

Original Photoshop was written in Pascal:

https://forum.lazarus.freepascal.org/index.php?topic=41032.0

Many of the best innovating applications were created using Pascal because it is the best language for inventors-creators.
(Mac OS, Skype, Fruity Loop, Photoshop, ...)

About a Photoshop killer, you may take a look at LazPaint:
https://github.com/bgrabitmap/lazpaint

It uses BGRABitmap graphic library.

Fre;D
 



« Last Edit: October 04, 2020, 12:44:41 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

twolivesbehindschedule

  • Newbie
  • Posts: 6
Re: I will make a photoshop killer
« Reply #7 on: October 04, 2020, 06:35:05 pm »
Thank you all guys for the directions, there's a lot of reading ahead.
This is the source code of CATWW version 0.2:
https://forum.lazarus.freepascal.org/index.php/topic,50989.msg373578.html#msg373578
I don't know if you have already done that or what it takes to be done, but a unix time clock would have been very interesting! and if it could compare all the time zones around the world with Unix time...


Hello.

Original Photoshop was written in Pascal:

https://forum.lazarus.freepascal.org/index.php?topic=41032.0

Many of the best innovating applications were created using Pascal because it is the best language for inventors-creators.
(Mac OS, Skype, Fruity Loop, Photoshop, ...)

About a Photoshop killer, you may take a look at LazPaint:
https://github.com/bgrabitmap/lazpaint

It uses BGRABitmap graphic library.

Fre;D

I had a class once where the teacher was written in Pascal, half mad, he taught me how to code from scratch.

And nothing will happen to photoshop from my part, I promise. Pity I have a finished program in C# that I thought that can only be done with WPF, now it seems Lazarus could do it too but I don't have the guts to rewrite it.

Handoko

  • Hero Member
  • *****
  • Posts: 5158
  • My goal: build my own game engine using Lazarus
Re: I will make a photoshop killer
« Reply #8 on: October 04, 2020, 07:45:28 pm »
Don't give up friend.

I started as a terrible programmer. After learned some programming lessons from books, I told my friend to build a computer game together. He wasn't interested in programming so he just helped me to draw a simple robot composed by some boxes. We just played Prince of Persia DOS version, he had high expectation about the quality of the game we were going to develop.

After some hard works, I showed him the prototype. Pressing the space, the robot really jumped up and after a second later, it landed back on the ground. The animation, oh my gosh, was so ugly. It did not follow the law of acceleration.

After that afternoon, he would never believe I can write computer games. Even I showed him some of my recent projects, he keeps believing my works are amateurish.

My real job is not programming but I still doing programming when I have time. After finishing my job, even I am tired I usually spend some time doing research and coding. I really enjoy doing it.

Now I can write computer games, I try something further. I am developing the software for developing games. My goal is very hard to be achieved. But I divided it into many simpler targets. So far, I managed to build the prototype of the graphics engine that runs correctly on Linux and Windows, it uses OpenGL. A module that store all the game inventory (images, audio, etc) into a single file, a kind of self-invent database. A proof of concept of the level editor, a proof of concept how to merge user game script into the binary not using Lazarus resource system. For the scripting engine, I'm now learning how to do interpreter.

You are lucky friend. Nowadays you can find a lot of reading materials, video tutorials and forums to help you learn programming. When I started to learn programming, there was no internet, programming books were very rare and people were not willing to share their knowledge.

Lazarus is a very powerful tool. You can build applications quickly. It is easier to learn compare to C/++/#. You can compile the project to run on Windows, Linux, Mac, Android even Raspberry Pi. There is no reason to give up.

Setting the target high is good. But you need to achieve it step by step. It needs time and hard works. And most importantly passion. You do it because you really enjoy doing it.
« Last Edit: October 04, 2020, 08:54:01 pm by Handoko »

twolivesbehindschedule

  • Newbie
  • Posts: 6
Re: I will make a photoshop killer
« Reply #9 on: October 04, 2020, 10:30:41 pm »
I don't give up! the title of this thread was an attempt for a joke, ''someone claiming that he will kill photoshop and then he asks
who to display a picture? FPC or Lasarus?''
I know I laugh by myself -.-

Was a big mistake to go to C, I never liked it, I just followed the edvises. Now I know that I have to examine what an individual have achieved with the tools he use and propose, before I take his advise.

But I divided it into many simpler targets.
Like every real programmer would do! (and smart people in general)

I don't know much about games I don't even play any, but someone who can even attempt to write a game engine he for sure can spam-produce much simpler software that many people need... Good luck with what you doing and also be aware of simple needs around...
« Last Edit: October 04, 2020, 11:21:44 pm by twolivesbehindschedule »

 

TinyPortal © 2005-2018