Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to retrain actual image quality on zoom image #65

Open
ast-gourav opened this issue Jan 3, 2024 · 0 comments
Open

how to retrain actual image quality on zoom image #65

ast-gourav opened this issue Jan 3, 2024 · 0 comments

Comments

@ast-gourav
Copy link

ast-gourav commented Jan 3, 2024

i have hd image like size is 1 to 2 mb but on zooming its not visible clear how can i retreive actual image quality but in web its showing actual image quality on zoom

my code:-

import React, {useState, useEffect} from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import Gallery from 'react-native-awesome-gallery';

const SpeechToTextComponent = () => {
  const [index, setIndex] = useState(0);
  const images = [
    'https://d22pqt2na9k0l.cloudfront.net/image/2023/11/11/kka/kol/08/10nov23_pk_kka_kol_8_r1_20231116062003.jpg',
    'https://d22pqt2na9k0l.cloudfront.net/image/2023/11/11/kka/kol/08/10nov23_pk_kka_kol_8_r1_20231116062003.jpg',
    'https://d22pqt2na9k0l.cloudfront.net/image/2023/11/11/kka/kol/08/10nov23_pk_kka_kol_8_r1_20231116062003.jpg',
    'https://d22pqt2na9k0l.cloudfront.net/image/2023/11/11/kka/kol/08/10nov23_pk_kka_kol_8_r1_20231116062003.jpg',
  ];
  const [scale, setScale] = useState(1); // Initial scale

  const handleScaleChange = newScale => {
    console.log("newScale", newScale);
    // Update the scale state
    setScale(newScale);
  };

  return (
    <View>
      {/* <PrabhatKharbharLogoForLightMode height={130} width={270}/> */}
      <Gallery
        data={images}
        onIndexChange={newIndex => {
          console.log(newIndex);
          setIndex(newIndex);
        }}
        key={index?.toString()}
        disableTransitionOnScaledImage={true}
        hideAdjacentImagesOnScaledImage={true}
        onScaleChangeRange={({scale, width, height}) => {
          // Adjust width and height according to scale
          const adjustedWidth = width * scale;
          const adjustedHeight = height * scale;
    
          return {width: adjustedWidth, height: adjustedHeight};
        }}
      />
    </View>
  );
};

export default SpeechToTextComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant