You are Here:
Linux Lite 4.0 Beta has been released. See the Release Announcements Section.




[ HELPFUL TIP ] Converting image files (*.png to *.jpg) in LL3.6

Author (Read 1020 times)

0 Members and 1 Guest are viewing this topic.

Converting image files (*.png to *.jpg) in LL3.6
« on: September 21, 2017, 05:48:03 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 716
    Posts
  • Country: gb
  • Reputation: 72
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core i7-4710HQ@2.5GHz (4cores 8threads) on an Asus G750JS

  • MEMORY: 16Gb

  • VIDEO CARD: NVidia Geforce GTX 870M
The other day, while using LL3.6, I needed to convert a *.png image file to an *.jpg one, before I could upload it to a website. I found the solution and thought I would share it with you - it's dead easy, which is what I like ...  ;)

It works in the terminal, through the imagemagick application (which is pre-installed on LL3.6), as far as I'm aware.

1. Open terminal
2. Type:
Code: [Select]
convert image.png image.jpg... where "image" is the name of your image file

Other information ...
-  it will keep the original *.png file, i.e. it won't be deleted during conversion.
-  for batch files (those which contain commands), replace convert with mogrify
Last Edit: September 28, 2017, 03:48:10 PM by m654321
Left WinXP in 2014, moving to LL1.08 after trying lots of distros. Family's laptops (in order of manufacture year) are given below. All use a 64bit OS installed on MBR (msdos/ext4) formatted SSD. PCLOS & Manjaro (both xfce) are used to give plug&play with external displays. The OS shown may sometimes change:    
(1) 2014 - Asus G750JS (4cores 8threads) ~ Intel Core i7-4710HQ@2.5GHz - LL3.8 only, appears to be working perfectly!
(2) 2011 - Samsung NP-N145 Plus (1core 2threads) ~ Intel Atom N455@1.66GHz - Manjaro only - LL2.8 worked well, but LL3.x lagged
(3) 2008 - Asus X71Q (2cores 0threads) ~ Intel T3200@2.0GHz - LL3.8 only - working well
(4) 2007 - Dell Latitude D630 (2cores 0threads) ~ Intel T7100@1.8GHz - LL3.8/Manjaro/PCLinuxOS/Win7 multi-boot: LL is really zippy !
 


Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #1 on: September 21, 2017, 12:27:08 PM »
 

TheDead

  • I come here a lot
  • *****
  • 365
    Posts
  • Country: ca
  • Reputation: 27
  • Linux Lite Worshipper
    • My OpenDesktop Projects

  • Linux Lite: 3.8 32bit

  • CPU: HAL9000

  • MEMORY: 1Gb

  • VIDEO CARD: Oculus Rift v.5
Nice!
I usually use Gimp. But this is cool.

It's like having a scanner plugged in and works right away... take THAT Bill!
No drivers-fidling session.
- TheDead (TheUxNo0b)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #2 on: September 21, 2017, 03:15:14 PM »
 

m654321

  • Gold Level Poster
  • *******
  • 716
    Posts
  • Country: gb
  • Reputation: 72
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core i7-4710HQ@2.5GHz (4cores 8threads) on an Asus G750JS

  • MEMORY: 16Gb

  • VIDEO CARD: NVidia Geforce GTX 870M
@TheDead
Glad it was useful  ;)

Mike
Left WinXP in 2014, moving to LL1.08 after trying lots of distros. Family's laptops (in order of manufacture year) are given below. All use a 64bit OS installed on MBR (msdos/ext4) formatted SSD. PCLOS & Manjaro (both xfce) are used to give plug&play with external displays. The OS shown may sometimes change:    
(1) 2014 - Asus G750JS (4cores 8threads) ~ Intel Core i7-4710HQ@2.5GHz - LL3.8 only, appears to be working perfectly!
(2) 2011 - Samsung NP-N145 Plus (1core 2threads) ~ Intel Atom N455@1.66GHz - Manjaro only - LL2.8 worked well, but LL3.x lagged
(3) 2008 - Asus X71Q (2cores 0threads) ~ Intel T3200@2.0GHz - LL3.8 only - working well
(4) 2007 - Dell Latitude D630 (2cores 0threads) ~ Intel T7100@1.8GHz - LL3.8/Manjaro/PCLinuxOS/Win7 multi-boot: LL is really zippy !
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #3 on: September 21, 2017, 05:11:29 PM »
 

Moltke

  • I come here a lot
  • *****
  • 301
    Posts
  • Country: ve
  • Reputation: 43
  • Linux Lite Member

  • Linux Lite: 3.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750
Hi. Another way to do this is by selecting the *png file, right click on it and then select save a copy, in the saving window simply name the file adding the *jpg extension and save it, that's it.  ;D
Without each others help there ain't no hope for us :)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #4 on: September 21, 2017, 05:31:42 PM »
 

TheDead

  • I come here a lot
  • *****
  • 365
    Posts
  • Country: ca
  • Reputation: 27
  • Linux Lite Worshipper
    • My OpenDesktop Projects

  • Linux Lite: 3.8 32bit

  • CPU: HAL9000

  • MEMORY: 1Gb

  • VIDEO CARD: Oculus Rift v.5
@Moltke
Dunno about this on, maybe it just renames the file with another extension.
ADD : Just tried it, I dont have "Save a copy' in my Linux Lite 3.6, just "Create a backup copy" that clones it.
(insert Twilight Zone music)
or you just have an add-on ;)

Cheers!
- TheDead (TheUxNo0b)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #5 on: September 21, 2017, 05:48:55 PM »
 

Moltke

  • I come here a lot
  • *****
  • 301
    Posts
  • Country: ve
  • Reputation: 43
  • Linux Lite Member

  • Linux Lite: 3.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750
@Moltke
Dunno about this on, maybe it just renames the file with another extension.
ADD : Just tried it, I dont have "Save a copy' in my Linux Lite 3.6, just "Create a backup copy" that clones it.
(insert Twilight Zone music)
or you just have an add-on ;)

Cheers!
Yes my bad. I just checked and for "save a copy" you have to open the *png file in ristretto, click on "file" menu and there it is; "save a copy" then simply when saving rename it adding the *jpg extension and that's it. Guess I forgot this "little" detail. Sorry about that  ;)
Without each others help there ain't no hope for us :)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #6 on: September 22, 2017, 01:47:56 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 716
    Posts
  • Country: gb
  • Reputation: 72
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core i7-4710HQ@2.5GHz (4cores 8threads) on an Asus G750JS

  • MEMORY: 16Gb

  • VIDEO CARD: NVidia Geforce GTX 870M
Hi. Another way to do this is by selecting the *png file, right click on it and then select save a copy, in the saving window simply name the file adding the *jpg extension and save it, that's it.  ;D

Are you sure that renaming a file =  converting the file format?
I'm certainly no expert by any measure, but this doesn't seem right. Following the same logic one could suffix linux driver names with *.exe to make them work in Windows, which of course is not the case....

Could someone with some knowledgeable overview on this please comment?
I don't mean any disrespect towards you Moltke, whatsoever, when I say that and I hope it doesn't come across that way - I may well be incorrect with the comment I've made.

Many thanks
Mike
Last Edit: September 22, 2017, 05:48:17 AM by m654321
Left WinXP in 2014, moving to LL1.08 after trying lots of distros. Family's laptops (in order of manufacture year) are given below. All use a 64bit OS installed on MBR (msdos/ext4) formatted SSD. PCLOS & Manjaro (both xfce) are used to give plug&play with external displays. The OS shown may sometimes change:    
(1) 2014 - Asus G750JS (4cores 8threads) ~ Intel Core i7-4710HQ@2.5GHz - LL3.8 only, appears to be working perfectly!
(2) 2011 - Samsung NP-N145 Plus (1core 2threads) ~ Intel Atom N455@1.66GHz - Manjaro only - LL2.8 worked well, but LL3.x lagged
(3) 2008 - Asus X71Q (2cores 0threads) ~ Intel T3200@2.0GHz - LL3.8 only - working well
(4) 2007 - Dell Latitude D630 (2cores 0threads) ~ Intel T7100@1.8GHz - LL3.8/Manjaro/PCLinuxOS/Win7 multi-boot: LL is really zippy !
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #7 on: September 22, 2017, 06:53:55 AM »
 

Moltke

  • I come here a lot
  • *****
  • 301
    Posts
  • Country: ve
  • Reputation: 43
  • Linux Lite Member

  • Linux Lite: 3.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750
Hi. Another way to do this is by selecting the *png file, right click on it and then select save a copy, in the saving window simply name the file adding the *jpg extension and save it, that's it.  ;D

Are you sure that renaming a file =  converting the file format?
I'm certainly no expert by any measure, but this doesn't seem right. Following the same logic one could suffix linux driver names with *.exe to make them work in Windows, which of course is not the case....

Could someone with some knowledgeable overview on this please comment?
I don't mean any disrespect towards you Moltke, whatsoever, when I say that and I hope it doesn't come across that way - I may well be incorrect with the comment I've made.

Many thanks
Mike

hI @m654321
Well, first of all is not as simple as that, I forgot  and I did mentioned in another comment, that for that to work you have to open the *png file in ristretto then click on "file menu" select "save a copy", when saving rename the file adding the *jpg extension and that's it. It worked for me. However, I did noticed that ristretto doesn't recognize the new file as a *jpg file while image magick does. Regarding your coment "Following the same logic one could suffix linux driver names with *.exe" this won't work because an *.exe file has some other attributes/properties which you can't just change by renaming it. I know this method can work on certain file types like images and texts, at least in windows it is possible check this out https://www.techwalla.com/articles/how-to-convert-rar-to-cbr. I guess it should be possible in Linux too.  ;D
Last Edit: September 22, 2017, 08:38:33 AM by Moltke
Without each others help there ain't no hope for us :)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #8 on: September 26, 2017, 11:17:30 AM »
 

TheDead

  • I come here a lot
  • *****
  • 365
    Posts
  • Country: ca
  • Reputation: 27
  • Linux Lite Worshipper
    • My OpenDesktop Projects

  • Linux Lite: 3.8 32bit

  • CPU: HAL9000

  • MEMORY: 1Gb

  • VIDEO CARD: Oculus Rift v.5
Yes my bad. I just checked and for "save a copy" you have to open the *png file in ristretto, click on "file" menu and there it is; "save a copy" then simply when saving rename it adding the *jpg extension and that's it. Guess I forgot this "little" detail. Sorry about that  ;)

NP, I'll have a look at Ristretto in the future. I havent really looked for a quick viewer, I've been using xnview for year on 'doze, one of the first program I usually install to replace the too-basic one in this OS ;)
- TheDead (TheUxNo0b)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #9 on: September 26, 2017, 11:34:17 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 716
    Posts
  • Country: gb
  • Reputation: 72
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core i7-4710HQ@2.5GHz (4cores 8threads) on an Asus G750JS

  • MEMORY: 16Gb

  • VIDEO CARD: NVidia Geforce GTX 870M
Hi. Another way to do this is by selecting the *png file, right click on it and then select save a copy, in the saving window simply name the file adding the *jpg extension and save it, that's it.  ;D

Thanks Moltke - I overlooked that detail - thankyou for pointing it out to me as I didn't know about that option.
I quite like the terminal method for changing the image format as it's so simple & direct.
I mentioned batch files in post #1 - do you know if Ristretto can also convert the format of those too?

Cheers
Mike
Last Edit: September 26, 2017, 11:38:30 AM by m654321
Left WinXP in 2014, moving to LL1.08 after trying lots of distros. Family's laptops (in order of manufacture year) are given below. All use a 64bit OS installed on MBR (msdos/ext4) formatted SSD. PCLOS & Manjaro (both xfce) are used to give plug&play with external displays. The OS shown may sometimes change:    
(1) 2014 - Asus G750JS (4cores 8threads) ~ Intel Core i7-4710HQ@2.5GHz - LL3.8 only, appears to be working perfectly!
(2) 2011 - Samsung NP-N145 Plus (1core 2threads) ~ Intel Atom N455@1.66GHz - Manjaro only - LL2.8 worked well, but LL3.x lagged
(3) 2008 - Asus X71Q (2cores 0threads) ~ Intel T3200@2.0GHz - LL3.8 only - working well
(4) 2007 - Dell Latitude D630 (2cores 0threads) ~ Intel T7100@1.8GHz - LL3.8/Manjaro/PCLinuxOS/Win7 multi-boot: LL is really zippy !
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #10 on: September 26, 2017, 08:40:49 PM »
 

Moltke

  • I come here a lot
  • *****
  • 301
    Posts
  • Country: ve
  • Reputation: 43
  • Linux Lite Member

  • Linux Lite: 3.8 64bit

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750
Hi. Another way to do this is by selecting the *png file, right click on it and then select save a copy, in the saving window simply name the file adding the *jpg extension and save it, that's it.  ;D

Thanks Moltke - I overlooked that detail - thankyou for pointing it out to me as I didn't know about that option.
I quite like the terminal method for changing the image format as it's so simple & direct.
I mentioned batch files in post #1 - do you know if Ristretto can also convert the format of those too?

Cheers
Mike
You're welcome! I do agree with you about the terminal method being simpler and direct, I only thought of sharing the "save a copy" method with ristretto too, not because I think it's better but because it's possible. Regarding your question about Ristretto being able to convert between formats, according to this manual https://docs.xfce.org/apps/ristretto/getting-started seems it's not meant for converting images. However, I did changed the *.png extension to *.jpg but it didn't recognize it as a *.jpg img while image magick did. If I right click the *jpg img and check its properties it does says it's a *.jpg file though.
Without each others help there ain't no hope for us :)
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #11 on: September 28, 2017, 12:39:25 PM »
 

whateverthing

  • Occasional Poster
  • **
  • 51
    Posts
  • Country: us
  • Reputation: 14
    • My Tumblr: KarHutWhat

  • Linux Lite: 3.4 32bit

  • CPU: Pentium M 1.86GHz

  • MEMORY: 512mb
Regarding whether "save a copy" in Ristretto actually converts the file:

I don't have the system in front of me. But if a .PNG is converted to a .JPG, the .JPG file should be noticeably smaller. So if the two files (before and after) are exactly the same size, then I'm pretty sure no conversion took place.
=Karl=
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #12 on: September 28, 2017, 01:19:10 PM »
 

smhardesty

  • Forum Regular
  • ***
  • 130
    Posts
  • Country: us
  • Reputation: 21
  • Linux Lite Member

  • Linux Lite: 3.4 64bit

  • CPU: AMD A8-6410 APU

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Radeon R5 Graphics 4
Can't say for sure about Ristretto, but I do know that Mirage will convert from one file type to another when choosing to "save as" and then change the extension type.
Steve

If I was able to help, click my "Thank" link.
 

Re: Converting image files (*.png to *.jpg) in LL3.6
« Reply #13 on: May 14, 2018, 04:45:03 PM »
 

NN

  • Forum Regular
  • ***
  • 143
    Posts
  • Country: ru
  • Reputation: 5
  • a visitor

  • Linux Lite: 3.8 64bit

  • CPU: 4x Intel(R) Atom(TM) CPU N2600 @ 1.60GHz

  • MEMORY: 1Gb

  • VIDEO CARD: OpenGL Renderer: llvmpipe (LLVM 5.0, 128 bits)
Though it is very easy to type a command in the console, many newcomers from Windows are frightened by the necessity of using the terminal in Linux'es. So the less console commands the better for just beginners in Linux.

The command is:

sudo apt install converseen simple-image-reducer -y

Converseen and simple-image-reducer are separate apps, while converseen converts images to lots of image formats and simple-image-reducer is a simple image-resizer.

To make the work with the apps quicker and more comfortable for former Windows users it is preferable, to my mind, to avoid using the terminal, so special commands or send-to files should be added to Thunar 'out of the box'.
Last Edit: May 14, 2018, 04:50:49 PM by NN
Three things admire me - Life, Music and Linux!
Три вещи восхищают меня - Жизнь, Музыка и Линукс!

https://www.linuxliteos.com/forums/off-topic/making-friends-with-the-terminal/
 


 


Linux Lite 4.0 Beta has been released. See the Release Announcements Section.