Coder Social home page Coder Social logo

Comments (16)

malavolti avatar malavolti commented on June 3, 2024 1

@malavolti I found the problem and a solution. May I use the picture you provided as test-material in the project (adding it to /test/backend/assets/)?

Yes, sure! 😊

from pigallery2.

malavolti avatar malavolti commented on June 3, 2024 1

@malavolti Hey again

I upgraded the image-size version in #879, but I actually found out that it incorrectly reports the dimensions of your photo as 512x512. It fixes the problem with null in pigallery, but it's still not correct.

Would you mind me submitting the photo in a bug-report over at https://github.com/image-size/ ?

Yes, no problem. Thank you! 😊

from pigallery2.

malavolti avatar malavolti commented on June 3, 2024 1

IMG_20240524_143140

I can say that with this version I can see the HEIC images, but all of them are compressed to the resolution of 512x512. :(

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024 1

@malavolti thanks. So the issue here is resolved.

But there is a new issue. However, it's about the image-size library. I reported the bug over there: image-size/image-size#403
@bpatrik should we raise an issue here for pigallery "HEIC image size reported wrongly"? with a description linking to the above bug-report?

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

@malavolti I found the problem and a solution. May I use the picture you provided as test-material in the project (adding it to /test/backend/assets/)?

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

@malavolti Hey again

I upgraded the image-size version in #879, but I actually found out that it incorrectly reports the dimensions of your photo as 512x512. It fixes the problem with null in pigallery, but it's still not correct.

Would you mind me submitting the photo in a bug-report over at https://github.com/image-size/ ?

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

@malavolti If you have the opportunity to install the latest edge-version. The issue should be resolved by that. Otherwise, please let me know ;)

from pigallery2.

malavolti avatar malavolti commented on June 3, 2024

I'll try as soon as possible! 😊 Thank you for all!

from pigallery2.

bpatrik avatar bpatrik commented on June 3, 2024

NOTE: builds are failing in the last few days(weeks):
kÊp

So edge might not have the new fix-feature.

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

@bpatrik I think this is merged, so should probably be added to the "Next (probably v2.5)" milestone?

from pigallery2.

bpatrik avatar bpatrik commented on June 3, 2024

Can someone confirm that the original issue was fixed?

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

Maybe @malavolti is still around to test latest edge build?

from pigallery2.

malavolti avatar malavolti commented on June 3, 2024

Dear @grasdk I've test the only the image that I shared with you in the past and the latest edge build fails with the same error of the issue I have opened in April.

2024-01-28_13.43.14.heic.txt

5/16/2024, 10:19:52 PM[INFO_][server] running diagnostics...
5/16/2024, 10:19:52 PM[INFO_][SQLConnection] Updating database scheme
5/16/2024, 10:19:52 PM[WARN_][ConfigDiagnostics] Jobs error. Resetting to default for now to let the app start up. Please adjust the config properly. Error: Unknown Job :Thumbnail Generation
5/16/2024, 10:19:52 PM[INFO_][JobManager] Running job schedules
5/16/2024, 10:19:52 PM[INFO_][server] Listening on port 80
QueryFailedError: SqliteError: NOT NULL constraint failed: media_entity.metadataSizeWidth
    at BetterSqlite3QueryRunner.query (/app/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js:103:19)
    at async InsertQueryBuilder.execute (/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
    at async SubjectExecutor.executeInsertOperations (/app/node_modules/typeorm/persistence/SubjectExecutor.js:260:42)
    at async SubjectExecutor.execute (/app/node_modules/typeorm/persistence/SubjectExecutor.js:92:9)
    at async EntityPersistExecutor.execute (/app/node_modules/typeorm/persistence/EntityPersistExecutor.js:148:21)
    at async IndexingManager.saveChunk (/app/src/backend/model/database/IndexingManager.js:400:20)
    at async IndexingManager.saveMedia (/app/src/backend/model/database/IndexingManager.js:329:9)
    at async IndexingManager.saveToDB (/app/src/backend/model/database/IndexingManager.js:95:13)
    at async IndexingManager.queueForSave (/app/src/backend/model/database/IndexingManager.js:128:17) {
  query: 'INSERT INTO "media_entity"("id", "name", "type", "directoryId", "metadataCaption", "metadataTitle", "metadataCreationdate", "metadataCreationdateoffset", "metadataFilesize", "metadataKeywords", "metadataRating", "metadataFaces", "metadataPersons", "metadataPersonslength", "metadataBitrate", "metadataDuration", "metadataSizeWidth", "metadataSizeHeight", "metadataCameraDataIso", "metadataCameraDataModel", "metadataCameraDataMake", "metadataCameraDataFstop", "metadataCameraDataExposure", "metadataCameraDataFocallength", "metadataCameraDataLens", "metadataPositionDataCountry", "metadataPositionDataState", "metadataPositionDataCity", "metadataPositionDataGPSDataLatitude", "metadataPositionDataGPSDataLongitude") VALUES (NULL, ?, ?, 1, NULL, NULL, 1706438594000, 180, 2158564, NULL, NULL, NULL, NULL, 0, NULL, NULL, ?, ?, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9.061331, 38.761711)',
  parameters: [ '2024-01-28_13.43.14.heic', 'PhotoEntity', null, null ],
  driverError: SqliteError: NOT NULL constraint failed: media_entity.metadataSizeWidth
      at BetterSqlite3QueryRunner.query (/app/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js:85:38)
      at async InsertQueryBuilder.execute (/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
      at async SubjectExecutor.executeInsertOperations (/app/node_modules/typeorm/persistence/SubjectExecutor.js:260:42)
      at async SubjectExecutor.execute (/app/node_modules/typeorm/persistence/SubjectExecutor.js:92:9)
      at async EntityPersistExecutor.execute (/app/node_modules/typeorm/persistence/EntityPersistExecutor.js:148:21)
      at async IndexingManager.saveChunk (/app/src/backend/model/database/IndexingManager.js:400:20)
      at async IndexingManager.saveMedia (/app/src/backend/model/database/IndexingManager.js:329:9)
      at async IndexingManager.saveToDB (/app/src/backend/model/database/IndexingManager.js:95:13)
      at async IndexingManager.queueForSave (/app/src/backend/model/database/IndexingManager.js:128:17) {
    code: 'SQLITE_CONSTRAINT_NOTNULL'
  },
  code: 'SQLITE_CONSTRAINT_NOTNULL'
}

Rename the file to get the image.heic

I've used the following docker-compose.yml and simply added heic and heif to supportedFormats into config.json file:

services:
  pigallery2:
    image: bpatrik/pigallery2:edge-alpine
    container_name: pigallery2
    environment:
      - NODE_ENV=production # set to 'debug' for full debug logging
      # - NODE_OPTIONS=--enable-source-maps # enable source map support on the backend for development
    volumes:
      - "./config:/app/data/config"
      - "./db-data:/app/data/db"
      - "./images:/app/data/images:rw"
      - "./tmp:/app/data/tmp"
    ports:
      - "85:80"
    restart: always

Thank you so much!
Marco

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

Hey @malavolti

Thank you for the input. Can you show the version of pigallery (click settings, hover over the app-version):
image

  • mine is in Danish locale.

from pigallery2.

malavolti avatar malavolti commented on June 3, 2024

Hey @malavolti

Thank you for the input. Can you show the version of pigallery (click settings, hover over the app-version):
image

  • mine is in Danish locale.

IMG_20240517_140856.jpg

from pigallery2.

grasdk avatar grasdk commented on June 3, 2024

I see the build date is 5th of april. Before the fix. You may need to clear the edge build image from your docker installation to force an update.

from pigallery2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.