taskGNU Astronomy Utilities - Tasks: task #16096, Writing of TIFF files

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #16096: Writing of TIFF files

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Wed 15 Dec 2021 08:10:50 PM UTC
   
 
Should Start On:  Wed 15 Dec 2021 12:00:00 AM UTC Should be Finished on:  Wed 15 Dec 2021 12:00:00 AM UTC
Category:  Libraries Priority:  5 - Normal
Item Group:  Enhancement Status:  Done
Privacy:  Public Assigned to:  None
Percent Complete:  100% Open/Closed:  Closed
Effort:  0.00

Jump to the original submission

Wed 12 Jul 2023 05:04:24 PM UTC, comment #8: 

Thanks a lot Fathma, I reviewed the code and tested it, it works beautifully! Nice work :-). It has been merged into the 'master' branch.

Here are some points to consider for future work:

  • Lines should not end in a space character.
  • First paragraph of commit body should start with "Until now, ...".
  • In the commit message (or comments), function names or variable names should be enclosed in single quotes (') to separate them from the normal flow of English text.
  • The GNU coding standards (for example placment of '{' and '}' should be followed accurate). See https://www.gnu.org/prep/standards/html_node/Formatting.html
  • The spacing between groups of functions (that have commented titles; "Write into a TIFF file" in this case) should be 20 empty lines.
  • When you add a new file based on a previous one (like the test script), don't forget to add your name and update the copyright year.
Mohammad Akhlaghi <makhlaghi>
Group administrator
Thu 06 Jul 2023 07:24:42 PM UTC, comment #7: 

I have fixed the previous errors and now the check passes without any issue. Let me know if there is something I might have missed.

You can find the recent changes here: https://github.com/fathmamehnoor/gnuastro/commit/276bba56dc26e69e992e4ee3a291158e53c41595

Sorry about the previous commit message. I will make sure to follow the guidelines thoroughly :)


Fathma Mehnoor <fathmamehnoor>
Mon 24 Apr 2023 08:34:45 PM UTC, comment #6: 

I pulled the branch and tried running 'make check', but hit some minor issues that were fixed in this temporary commit (we'll later merge all the commits in this branch as one commit to merge). However, the check still failed with this error:


../bin/convertt/astconvertt: gal_tiff_write: 'psf.tif', widthinpx=0, bitspersample=0,numch=1, values should be greater than 0
FAIL convertt/fitstotiff.sh (exit status: 1)


I also rebased the branch over the latest 'master' branch. Can you please pull this new branch, and see if you can reproduce this error? If so, it would be great if you can look into its cause ;-).

By the way, your original commit message lines were longer than 80 characters and didn't have any empty line between the paragraphs, for future commits, try to follow the Gnuastro commit guidelines so the commit blends nicely into the whole history ;-). I see you had followed many of the guidelines, this one may have slipped through your fingers ;-).

Mohammad Akhlaghi <makhlaghi>
Group administrator
Wed 29 Mar 2023 04:34:19 PM UTC, comment #5: 

I had a look at the general code and it looks clean and very well written. Nice work Fathma! I will have a closer look at it in the next few days and give feedback.

Privately, I'll send you the GNU copyright info you need to complete so I can merge your work into the master branch when it is ready (it takes a few days to finish the copyright forms!). For an explanation see https://www.gnu.org/savannah-checkouts/gnu/gnuastro/manual/html_node/Copyright-assignment.html

Mohammad Akhlaghi <makhlaghi>
Group administrator
Wed 29 Mar 2023 03:57:37 PM UTC, comment #4: 

I have worked on implementing this task and I would appreciate feedback on it.
You can find the changes here: https://github.com/fathmamehnoor/gnuastro/tree/add-tiff-write

Fathma Mehnoor <fathmamehnoor>
Tue 14 Mar 2023 04:47:12 PM UTC, comment #3: 

Thanks for your interest Fathma, it will be a very useful feature to add to Gnuastro ;-).

Mohammad Akhlaghi <makhlaghi>
Group administrator
Tue 14 Mar 2023 03:43:05 PM UTC, comment #2: 

Hello, I have been looking through this task and I am interested in working on it.

Fathma Mehnoor <fathmamehnoor>
Wed 15 Dec 2021 08:12:54 PM UTC, comment #1: 

In the previous post I forgot to mention that Pablo Manuel Sanchez Alarcon suggested this in a post to bug-gnuastro.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Wed 15 Dec 2021 08:10:50 PM UTC, original submission:  

Currently Gnuastro's can only read from TIFF files, it can't write to them (see the lib/tiff.c file in Gnuastro's source)!

The main reason behind this was time: unlike JPEG (which is only one image per file), TIFF allows multiple images per file (like FITS extensions), so the libtiff library's writing functions are a little more complicated than those functions for reading.

As a result, I only implemented reading of TIFF files (which I needed at that moment), not writing of TIFF files!

If anyone is interested in doing this, please make a post here, its a good chance to learn professional APIs of important libraries!

I'd be happy to help. There are other examples of reading or writing to different file formats, like lib/eps.c (for writing EPS files), lib/jpeg.c (for reading/writing JPEG files), lib/pdf.c (for writing PDF files, which actually writes EPS, then compiles them to PDF), and of course, lib/tiff.c (that currently on reads from TIFF files).

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by fathmamehnoor (Posted a comment)
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-12 makhlaghi StatusPostponed Done
        Percent Complete70% 100%
        Open/ClosedOpen Closed
    2023-03-29 makhlaghi Percent Complete0% 70%
    2021-12-15 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code