Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 204a4819

Přidáno uživatelem smoldas15 před téměř 5 roky(ů)

Re #7912: Ořezávání obrázků

- úprava defaultní hodnoty výšky slova

Zobrazit rozdíly:

be/fulltextsearch/src/main/java/cz/zcu/kiv/aswi/fulltextsearch/SolrService.java
55 55
    private static final int DEFAULT_LINE_FIELD_COUNT = 150;
56 56
    private static final int DEFAULT_WORD_FIELD_COUNT = 30;
57 57

  
58
    private static final int DEFAULT_WORD_HEIGHT = 30;
58
    private static final int AVERAGE_NUMBER_OF_ROWS_PER_PAGE = 80;
59 59

  
60 60
    private HttpSolrClient solrClientDocuments;
61 61
    private HttpSolrClient solrClientFiles;
......
323 323
                    coordsValue = (String) solrDocument.getFieldValue(linesNames.stream().findFirst().get() + SUFFIX_COORDS);
324 324
                }
325 325
                Point[] arrPoints = Coords.parsePointString(coordsValue);
326
                int wordHeight = DEFAULT_WORD_HEIGHT;
326
                int wordHeight = img.getHeight() / AVERAGE_NUMBER_OF_ROWS_PER_PAGE;
327 327

  
328 328
                if (arrPoints.length == 4) {
329 329
                    wordHeight = arrPoints[2].getY() - arrPoints[0].getY();

Také k dispozici: Unified diff