| <<<Back 1 day (to 2017/09/23) | 20170924 |
sebras | Robin_Watts (for the logs): In "Ensure PNG output is not premultiplied output." on line p = x ? prev[k] : 0; the array prev is not initialized since it is recreated for each loop, maybe the array should be declared before "for (x = 0; x < w;..."? | 08:45.27 |
sebras | as triggered by coverity. | 08:45.45 |
| Robin: also in fz_paint_affine_lerp() if e.g. da is > 0 and sa > 0 but alpha == 0, what function should be used? at the moment nothing is called and we crash. | 08:52.56 |
| same for fz_paint_affine_near(). | 08:53.06 |
| the spots functions seem to have the same issue. | 08:53.48 |
| this was discovered in 698588 | 08:53.57 |
| the problem is that we get stuck in the assert(paintfn) in fz_paint_image_imp(). | 08:54.47 |
| to me it appears as if no paintfn should be called since we're painting the src using alpha == 0, i.e. paint nothing. | 08:55.29 |
LRN | i'm trying to use mupdf to do some rudimentary edits to a pdf file, which should then be saved. Problem is, i can't write the changed data back into the file, because the file is still opened | 21:41.29 |
| How is this usually handled in real-life applications? Reading the file into a memory buffer to ensure that the original is not kept open? | 21:42.31 |
| Copying the file into a temp location and using that copy as a source? | 21:42.37 |
| Writing changed data into a temp file, closing the original, then substituting the original with the newly-created temp file? | 21:43.02 |
| What if i'm combining pages from multiple files? Reading each one of them completely into memory might be expensive. | 21:47.21 |
| How much memory does a pdf_document object take anyway? Does it read data from the source file on demand (caching it in the store)? Do i gain anything by not keeping the pdf_obj objects around when they are not in use, while still keeping the pdf_document? | 21:48.54 |
Robin_Watts | "Writing changed data into a temp file, closing the original, then substituting the original with the newly-created temp file?" - That one. | 23:15.44 |
| LRN: ^ | 23:15.53 |
| How much memory does a pdf_document object take? Depends on the object. | 23:16.08 |
| Yes, (bulk) data is read from the source file on demand. | 23:16.37 |
| Don't hold onto pdf_obj objects for longer than you need to. | 23:16.57 |
| but don't discard them and re-read them for the sake of it. | 23:17.12 |
LRN | thanks | 23:42.56 |
| Forward 1 day (to 2017/09/25)>>> | |